| 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 23 matching lines...) Expand all Loading... |
| 34 #include "chrome/browser/profiles/profile_shortcut_manager.h" | 34 #include "chrome/browser/profiles/profile_shortcut_manager.h" |
| 35 #include "chrome/browser/shell_integration.h" | 35 #include "chrome/browser/shell_integration.h" |
| 36 #include "chrome/browser/ui/simple_message_box.h" | 36 #include "chrome/browser/ui/simple_message_box.h" |
| 37 #include "chrome/browser/ui/uninstall_browser_prompt.h" | 37 #include "chrome/browser/ui/uninstall_browser_prompt.h" |
| 38 #include "chrome/common/chrome_constants.h" | 38 #include "chrome/common/chrome_constants.h" |
| 39 #include "chrome/common/chrome_result_codes.h" | 39 #include "chrome/common/chrome_result_codes.h" |
| 40 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
| 41 #include "chrome/common/chrome_utility_messages.h" | 41 #include "chrome/common/chrome_utility_messages.h" |
| 42 #include "chrome/common/chrome_version_info.h" | 42 #include "chrome/common/chrome_version_info.h" |
| 43 #include "chrome/common/env_vars.h" | 43 #include "chrome/common/env_vars.h" |
| 44 #include "chrome/common/terminate_on_heap_corruption_experiment_win.h" | |
| 45 #include "chrome/grit/chromium_strings.h" | 44 #include "chrome/grit/chromium_strings.h" |
| 46 #include "chrome/grit/generated_resources.h" | 45 #include "chrome/grit/generated_resources.h" |
| 47 #include "chrome/installer/util/browser_distribution.h" | 46 #include "chrome/installer/util/browser_distribution.h" |
| 48 #include "chrome/installer/util/helper.h" | 47 #include "chrome/installer/util/helper.h" |
| 49 #include "chrome/installer/util/install_util.h" | 48 #include "chrome/installer/util/install_util.h" |
| 50 #include "chrome/installer/util/l10n_string_util.h" | 49 #include "chrome/installer/util/l10n_string_util.h" |
| 51 #include "chrome/installer/util/shell_util.h" | 50 #include "chrome/installer/util/shell_util.h" |
| 52 #include "content/public/browser/browser_thread.h" | 51 #include "content/public/browser/browser_thread.h" |
| 53 #include "content/public/browser/utility_process_host.h" | 52 #include "content/public/browser/utility_process_host.h" |
| 54 #include "content/public/browser/utility_process_host_client.h" | 53 #include "content/public/browser/utility_process_host_client.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 // Set up a task to verify installed modules in the current process. Use a | 263 // Set up a task to verify installed modules in the current process. Use a |
| 265 // delay to reduce the impact on startup time. | 264 // delay to reduce the impact on startup time. |
| 266 content::BrowserThread::GetMessageLoopProxyForThread( | 265 content::BrowserThread::GetMessageLoopProxyForThread( |
| 267 content::BrowserThread::UI)->PostDelayedTask( | 266 content::BrowserThread::UI)->PostDelayedTask( |
| 268 FROM_HERE, | 267 FROM_HERE, |
| 269 base::Bind(&VerifyInstallation), | 268 base::Bind(&VerifyInstallation), |
| 270 base::TimeDelta::FromSeconds(45)); | 269 base::TimeDelta::FromSeconds(45)); |
| 271 | 270 |
| 272 InitializeChromeElf(); | 271 InitializeChromeElf(); |
| 273 | 272 |
| 274 // TODO(erikwright): Remove this and the implementation of the experiment by | |
| 275 // September 2014. | |
| 276 InitializeDisableTerminateOnHeapCorruptionExperiment(); | |
| 277 | |
| 278 #if defined(GOOGLE_CHROME_BUILD) | 273 #if defined(GOOGLE_CHROME_BUILD) |
| 279 did_run_updater_.reset(new DidRunUpdater); | 274 did_run_updater_.reset(new DidRunUpdater); |
| 280 #endif | 275 #endif |
| 281 } | 276 } |
| 282 | 277 |
| 283 // static | 278 // static |
| 284 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 279 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
| 285 const base::CommandLine& parsed_command_line) { | 280 const base::CommandLine& parsed_command_line) { |
| 286 // Clear this var so child processes don't show the dialog by default. | 281 // Clear this var so child processes don't show the dialog by default. |
| 287 scoped_ptr<base::Environment> env(base::Environment::Create()); | 282 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 if (resource_id) | 454 if (resource_id) |
| 460 return l10n_util::GetStringUTF16(resource_id); | 455 return l10n_util::GetStringUTF16(resource_id); |
| 461 return base::string16(); | 456 return base::string16(); |
| 462 } | 457 } |
| 463 | 458 |
| 464 // static | 459 // static |
| 465 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 460 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 466 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 461 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 467 installer::SetTranslationDelegate(&delegate); | 462 installer::SetTranslationDelegate(&delegate); |
| 468 } | 463 } |
| OLD | NEW |