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" | |
42 #include "chrome/installer/launcher_support/chrome_launcher_support.h" | 41 #include "chrome/installer/launcher_support/chrome_launcher_support.h" |
43 #include "chrome/installer/util/browser_distribution.h" | 42 #include "chrome/installer/util/browser_distribution.h" |
44 #include "chrome/installer/util/helper.h" | 43 #include "chrome/installer/util/helper.h" |
45 #include "chrome/installer/util/install_util.h" | 44 #include "chrome/installer/util/install_util.h" |
46 #include "chrome/installer/util/l10n_string_util.h" | 45 #include "chrome/installer/util/l10n_string_util.h" |
47 #include "chrome/installer/util/shell_util.h" | 46 #include "chrome/installer/util/shell_util.h" |
48 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
49 #include "content/public/common/main_function_params.h" | 48 #include "content/public/common/main_function_params.h" |
50 #include "grit/app_locale_settings.h" | 49 #include "grit/app_locale_settings.h" |
51 #include "grit/chromium_strings.h" | 50 #include "grit/chromium_strings.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 252 |
254 // Set up a task to verify installed modules in the current process. Use a | 253 // Set up a task to verify installed modules in the current process. Use a |
255 // delay to reduce the impact on startup time. | 254 // delay to reduce the impact on startup time. |
256 content::BrowserThread::GetMessageLoopProxyForThread( | 255 content::BrowserThread::GetMessageLoopProxyForThread( |
257 content::BrowserThread::UI)->PostDelayedTask( | 256 content::BrowserThread::UI)->PostDelayedTask( |
258 FROM_HERE, | 257 FROM_HERE, |
259 base::Bind(&VerifyInstallation), | 258 base::Bind(&VerifyInstallation), |
260 base::TimeDelta::FromSeconds(45)); | 259 base::TimeDelta::FromSeconds(45)); |
261 | 260 |
262 InitializeChromeElf(); | 261 InitializeChromeElf(); |
263 | |
264 // TODO(erikwright): Remove this and the implementation of the experiment by | |
265 // August 2014. | |
266 InitializeDisableTerminateOnHeapCorruptionExperiment(); | |
267 } | 262 } |
268 | 263 |
269 // static | 264 // static |
270 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 265 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
271 const CommandLine& parsed_command_line) { | 266 const CommandLine& parsed_command_line) { |
272 // Clear this var so child processes don't show the dialog by default. | 267 // Clear this var so child processes don't show the dialog by default. |
273 scoped_ptr<base::Environment> env(base::Environment::Create()); | 268 scoped_ptr<base::Environment> env(base::Environment::Create()); |
274 env->UnSetVar(env_vars::kShowRestart); | 269 env->UnSetVar(env_vars::kShowRestart); |
275 | 270 |
276 // For non-interactive tests we don't restart on crash. | 271 // For non-interactive tests we don't restart on crash. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 if (resource_id) | 441 if (resource_id) |
447 return l10n_util::GetStringUTF16(resource_id); | 442 return l10n_util::GetStringUTF16(resource_id); |
448 return base::string16(); | 443 return base::string16(); |
449 } | 444 } |
450 | 445 |
451 // static | 446 // static |
452 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 447 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
453 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 448 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
454 installer::SetTranslationDelegate(&delegate); | 449 installer::SetTranslationDelegate(&delegate); |
455 } | 450 } |
OLD | NEW |