| 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/metrics/histogram.h" |
| 17 #include "base/path_service.h" | 18 #include "base/path_service.h" |
| 18 #include "base/scoped_native_library.h" | 19 #include "base/scoped_native_library.h" |
| 19 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
| 20 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
| 21 #include "base/win/metro.h" | 22 #include "base/win/metro.h" |
| 23 #include "base/win/win_util.h" |
| 22 #include "base/win/windows_version.h" | 24 #include "base/win/windows_version.h" |
| 23 #include "base/win/wrapped_window_proc.h" | 25 #include "base/win/wrapped_window_proc.h" |
| 24 #include "chrome/browser/browser_util_win.h" | 26 #include "chrome/browser/browser_util_win.h" |
| 25 #include "chrome/browser/chrome_elf_init_win.h" | 27 #include "chrome/browser/chrome_elf_init_win.h" |
| 26 #include "chrome/browser/first_run/first_run.h" | 28 #include "chrome/browser/first_run/first_run.h" |
| 27 #include "chrome/browser/install_verification/win/install_verification.h" | 29 #include "chrome/browser/install_verification/win/install_verification.h" |
| 28 #include "chrome/browser/profiles/profile_info_cache.h" | 30 #include "chrome/browser/profiles/profile_info_cache.h" |
| 29 #include "chrome/browser/profiles/profile_shortcut_manager.h" | 31 #include "chrome/browser/profiles/profile_shortcut_manager.h" |
| 30 #include "chrome/browser/shell_integration.h" | 32 #include "chrome/browser/shell_integration.h" |
| 31 #include "chrome/browser/ui/simple_message_box.h" | 33 #include "chrome/browser/ui/simple_message_box.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { | 240 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { |
| 239 ui::MessageBox(NULL, | 241 ui::MessageBox(NULL, |
| 240 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), | 242 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), |
| 241 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), | 243 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), |
| 242 MB_OK | MB_ICONERROR | MB_TOPMOST); | 244 MB_OK | MB_ICONERROR | MB_TOPMOST); |
| 243 } | 245 } |
| 244 | 246 |
| 245 void ChromeBrowserMainPartsWin::PostBrowserStart() { | 247 void ChromeBrowserMainPartsWin::PostBrowserStart() { |
| 246 ChromeBrowserMainParts::PostBrowserStart(); | 248 ChromeBrowserMainParts::PostBrowserStart(); |
| 247 | 249 |
| 250 UMA_HISTOGRAM_BOOLEAN("Windows.Tablet", base::win::IsTabletDevice()); |
| 251 |
| 248 // Set up a task to verify installed modules in the current process. Use a | 252 // Set up a task to verify installed modules in the current process. Use a |
| 249 // delay to reduce the impact on startup time. | 253 // delay to reduce the impact on startup time. |
| 250 content::BrowserThread::GetMessageLoopProxyForThread( | 254 content::BrowserThread::GetMessageLoopProxyForThread( |
| 251 content::BrowserThread::UI)->PostDelayedTask( | 255 content::BrowserThread::UI)->PostDelayedTask( |
| 252 FROM_HERE, | 256 FROM_HERE, |
| 253 base::Bind(&VerifyInstallation), | 257 base::Bind(&VerifyInstallation), |
| 254 base::TimeDelta::FromSeconds(45)); | 258 base::TimeDelta::FromSeconds(45)); |
| 255 | 259 |
| 256 InitializeChromeElf(); | 260 InitializeChromeElf(); |
| 257 } | 261 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 if (resource_id) | 440 if (resource_id) |
| 437 return l10n_util::GetStringUTF16(resource_id); | 441 return l10n_util::GetStringUTF16(resource_id); |
| 438 return base::string16(); | 442 return base::string16(); |
| 439 } | 443 } |
| 440 | 444 |
| 441 // static | 445 // static |
| 442 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 446 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 443 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 447 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 444 installer::SetTranslationDelegate(&delegate); | 448 installer::SetTranslationDelegate(&delegate); |
| 445 } | 449 } |
| OLD | NEW |