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> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/environment.h" | 13 #include "base/environment.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
18 #include "base/scoped_native_library.h" | 18 #include "base/scoped_native_library.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/win/metro.h" | 21 #include "base/win/metro.h" |
22 #include "base/win/windows_version.h" | 22 #include "base/win/windows_version.h" |
23 #include "base/win/wrapped_window_proc.h" | 23 #include "base/win/wrapped_window_proc.h" |
24 #include "chrome/browser/browser_util_win.h" | 24 #include "chrome/browser/browser_util_win.h" |
25 #include "chrome/browser/install_module_verifier_win.h" | |
25 #include "chrome/browser/profiles/profile_info_cache.h" | 26 #include "chrome/browser/profiles/profile_info_cache.h" |
26 #include "chrome/browser/profiles/profile_shortcut_manager.h" | 27 #include "chrome/browser/profiles/profile_shortcut_manager.h" |
27 #include "chrome/browser/shell_integration.h" | 28 #include "chrome/browser/shell_integration.h" |
28 #include "chrome/browser/ui/simple_message_box.h" | 29 #include "chrome/browser/ui/simple_message_box.h" |
29 #include "chrome/browser/ui/uninstall_browser_prompt.h" | 30 #include "chrome/browser/ui/uninstall_browser_prompt.h" |
30 #include "chrome/common/chrome_constants.h" | 31 #include "chrome/common/chrome_constants.h" |
31 #include "chrome/common/chrome_result_codes.h" | 32 #include "chrome/common/chrome_result_codes.h" |
32 #include "chrome/common/chrome_switches.h" | 33 #include "chrome/common/chrome_switches.h" |
33 #include "chrome/common/chrome_version_info.h" | 34 #include "chrome/common/chrome_version_info.h" |
34 #include "chrome/common/env_vars.h" | 35 #include "chrome/common/env_vars.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 | 218 |
218 return rv; | 219 return rv; |
219 } | 220 } |
220 | 221 |
221 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { | 222 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { |
222 ui::MessageBox(NULL, ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), | 223 ui::MessageBox(NULL, ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), |
223 ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), | 224 ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), |
224 MB_OK | MB_ICONERROR | MB_TOPMOST); | 225 MB_OK | MB_ICONERROR | MB_TOPMOST); |
225 } | 226 } |
226 | 227 |
228 void ChromeBrowserMainPartsWin::PostBrowserStart() { | |
229 ChromeBrowserMainParts::PostBrowserStart(); | |
230 BeginModuleVerification(); | |
Finnur
2013/09/20 14:23:14
So... we decided (when I changed the module enumer
erikwright (departed)
2013/09/24 17:33:51
I added a delay here.
| |
231 } | |
232 | |
227 // static | 233 // static |
228 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 234 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
229 const CommandLine& parsed_command_line) { | 235 const CommandLine& parsed_command_line) { |
230 // Clear this var so child processes don't show the dialog by default. | 236 // Clear this var so child processes don't show the dialog by default. |
231 scoped_ptr<base::Environment> env(base::Environment::Create()); | 237 scoped_ptr<base::Environment> env(base::Environment::Create()); |
232 env->UnSetVar(env_vars::kShowRestart); | 238 env->UnSetVar(env_vars::kShowRestart); |
233 | 239 |
234 // For non-interactive tests we don't restart on crash. | 240 // For non-interactive tests we don't restart on crash. |
235 if (env->HasVar(env_vars::kHeadless)) | 241 if (env->HasVar(env_vars::kHeadless)) |
236 return; | 242 return; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
393 if (resource_id) | 399 if (resource_id) |
394 return l10n_util::GetStringUTF16(resource_id); | 400 return l10n_util::GetStringUTF16(resource_id); |
395 return string16(); | 401 return string16(); |
396 } | 402 } |
397 | 403 |
398 // static | 404 // static |
399 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 405 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
400 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 406 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
401 installer::SetTranslationDelegate(&delegate); | 407 installer::SetTranslationDelegate(&delegate); |
402 } | 408 } |
OLD | NEW |