Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chrome_browser_main_win.cc
index c03597d..71bf813 100644 (file)
@@ -38,7 +38,7 @@
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/chrome_version_info.h"
 #include "chrome/common/env_vars.h"
-#include "chrome/installer/launcher_support/chrome_launcher_support.h"
+#include "chrome/common/terminate_on_heap_corruption_experiment_win.h"
 #include "chrome/installer/util/browser_distribution.h"
 #include "chrome/installer/util/helper.h"
 #include "chrome/installer/util/install_util.h"
@@ -119,9 +119,7 @@ int DoUninstallTasks(bool chrome_still_running) {
     ShowCloseBrowserFirstMessageBox();
     return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE;
   }
-  int result = chrome::ShowUninstallBrowserPrompt(
-      !chrome_launcher_support::IsAppLauncherPresent());
-  // Don't offer to delete the profile if the App Launcher is also installed.
+  int result = chrome::ShowUninstallBrowserPrompt();
   if (browser_util::IsBrowserAlreadyRunning()) {
     ShowCloseBrowserFirstMessageBox();
     return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE;
@@ -155,26 +153,12 @@ int DoUninstallTasks(bool chrome_still_running) {
   return result;
 }
 
-void MaybeEnableHighResolutionTimeEverywhere() {
-  chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
-  bool user_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
-      switches::kEnableHighResolutionTime);
-  if (user_enabled || channel == chrome::VersionInfo::CHANNEL_CANARY) {
-    bool is_enabled = base::TimeTicks::SetNowIsHighResNowIfSupported();
-    if (is_enabled && !user_enabled) {
-      // Ensure that all of the renderers will enable it too.
-      CommandLine::ForCurrentProcess()->AppendSwitch(
-          switches::kEnableHighResolutionTime);
-    }
-  }
-}
-
 // ChromeBrowserMainPartsWin ---------------------------------------------------
 
 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin(
     const content::MainFunctionParams& parameters)
     : ChromeBrowserMainParts(parameters) {
-  MaybeEnableHighResolutionTimeEverywhere();
+  base::TimeTicks::SetNowIsHighResNowIfSupported();
   if (base::win::IsMetroProcess()) {
     typedef const wchar_t* (*GetMetroSwitches)(void);
     GetMetroSwitches metro_switches_proc = reinterpret_cast<GetMetroSwitches>(
@@ -259,6 +243,10 @@ void ChromeBrowserMainPartsWin::PostBrowserStart() {
           base::TimeDelta::FromSeconds(45));
 
   InitializeChromeElf();
+
+  // TODO(erikwright): Remove this and the implementation of the experiment by
+  // September 2014.
+  InitializeDisableTerminateOnHeapCorruptionExperiment();
 }
 
 // static