| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chrome_browser_main_win.h" | 5 #include "chrome/browser/chrome_browser_main_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "chrome/browser/profiles/profile_info_cache.h" | 31 #include "chrome/browser/profiles/profile_info_cache.h" |
| 32 #include "chrome/browser/profiles/profile_shortcut_manager.h" | 32 #include "chrome/browser/profiles/profile_shortcut_manager.h" |
| 33 #include "chrome/browser/shell_integration.h" | 33 #include "chrome/browser/shell_integration.h" |
| 34 #include "chrome/browser/ui/simple_message_box.h" | 34 #include "chrome/browser/ui/simple_message_box.h" |
| 35 #include "chrome/browser/ui/uninstall_browser_prompt.h" | 35 #include "chrome/browser/ui/uninstall_browser_prompt.h" |
| 36 #include "chrome/common/chrome_constants.h" | 36 #include "chrome/common/chrome_constants.h" |
| 37 #include "chrome/common/chrome_result_codes.h" | 37 #include "chrome/common/chrome_result_codes.h" |
| 38 #include "chrome/common/chrome_switches.h" | 38 #include "chrome/common/chrome_switches.h" |
| 39 #include "chrome/common/chrome_version_info.h" | 39 #include "chrome/common/chrome_version_info.h" |
| 40 #include "chrome/common/env_vars.h" | 40 #include "chrome/common/env_vars.h" |
| 41 #include "chrome/common/terminate_on_heap_corruption_experiment_win.h" |
| 41 #include "chrome/installer/launcher_support/chrome_launcher_support.h" | 42 #include "chrome/installer/launcher_support/chrome_launcher_support.h" |
| 42 #include "chrome/installer/util/browser_distribution.h" | 43 #include "chrome/installer/util/browser_distribution.h" |
| 43 #include "chrome/installer/util/helper.h" | 44 #include "chrome/installer/util/helper.h" |
| 44 #include "chrome/installer/util/install_util.h" | 45 #include "chrome/installer/util/install_util.h" |
| 45 #include "chrome/installer/util/l10n_string_util.h" | 46 #include "chrome/installer/util/l10n_string_util.h" |
| 46 #include "chrome/installer/util/shell_util.h" | 47 #include "chrome/installer/util/shell_util.h" |
| 47 #include "content/public/browser/browser_thread.h" | 48 #include "content/public/browser/browser_thread.h" |
| 48 #include "content/public/common/main_function_params.h" | 49 #include "content/public/common/main_function_params.h" |
| 49 #include "grit/app_locale_settings.h" | 50 #include "grit/app_locale_settings.h" |
| 50 #include "grit/chromium_strings.h" | 51 #include "grit/chromium_strings.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 253 |
| 253 // Set up a task to verify installed modules in the current process. Use a | 254 // Set up a task to verify installed modules in the current process. Use a |
| 254 // delay to reduce the impact on startup time. | 255 // delay to reduce the impact on startup time. |
| 255 content::BrowserThread::GetMessageLoopProxyForThread( | 256 content::BrowserThread::GetMessageLoopProxyForThread( |
| 256 content::BrowserThread::UI)->PostDelayedTask( | 257 content::BrowserThread::UI)->PostDelayedTask( |
| 257 FROM_HERE, | 258 FROM_HERE, |
| 258 base::Bind(&VerifyInstallation), | 259 base::Bind(&VerifyInstallation), |
| 259 base::TimeDelta::FromSeconds(45)); | 260 base::TimeDelta::FromSeconds(45)); |
| 260 | 261 |
| 261 InitializeChromeElf(); | 262 InitializeChromeElf(); |
| 263 |
| 264 // TODO(erikwright): Remove this and the implementation of the experiment by |
| 265 // August 2014. |
| 266 InitializeDisableTerminateOnHeapCorruptionExperiment(); |
| 262 } | 267 } |
| 263 | 268 |
| 264 // static | 269 // static |
| 265 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 270 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
| 266 const CommandLine& parsed_command_line) { | 271 const CommandLine& parsed_command_line) { |
| 267 // Clear this var so child processes don't show the dialog by default. | 272 // Clear this var so child processes don't show the dialog by default. |
| 268 scoped_ptr<base::Environment> env(base::Environment::Create()); | 273 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 269 env->UnSetVar(env_vars::kShowRestart); | 274 env->UnSetVar(env_vars::kShowRestart); |
| 270 | 275 |
| 271 // For non-interactive tests we don't restart on crash. | 276 // For non-interactive tests we don't restart on crash. |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 if (resource_id) | 446 if (resource_id) |
| 442 return l10n_util::GetStringUTF16(resource_id); | 447 return l10n_util::GetStringUTF16(resource_id); |
| 443 return base::string16(); | 448 return base::string16(); |
| 444 } | 449 } |
| 445 | 450 |
| 446 // static | 451 // static |
| 447 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 452 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 448 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 453 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 449 installer::SetTranslationDelegate(&delegate); | 454 installer::SetTranslationDelegate(&delegate); |
| 450 } | 455 } |
| OLD | NEW |