OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
6 #include "chrome/browser/browser_main_win.h" | 6 #include "chrome/browser/browser_main_win.h" |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void WarnAboutMinimumSystemRequirements() { | 76 void WarnAboutMinimumSystemRequirements() { |
77 if (base::win::GetVersion() < base::win::VERSION_XP) { | 77 if (base::win::GetVersion() < base::win::VERSION_XP) { |
78 // Display a warning message if the user is running chrome on Windows 2000. | 78 // Display a warning message if the user is running chrome on Windows 2000. |
79 const string16 text = | 79 const string16 text = |
80 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP); | 80 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP); |
81 const string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 81 const string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
82 ui::MessageBox(NULL, text, caption, MB_OK | MB_ICONWARNING | MB_TOPMOST); | 82 ui::MessageBox(NULL, text, caption, MB_OK | MB_ICONWARNING | MB_TOPMOST); |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
| 86 void ShowMissingLocaleMessageBox() { |
| 87 ui::MessageBox(NULL, ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), |
| 88 ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), |
| 89 MB_OK | MB_ICONERROR | MB_TOPMOST); |
| 90 } |
| 91 |
86 void RecordBrowserStartupTime() { | 92 void RecordBrowserStartupTime() { |
87 // Calculate the time that has elapsed from our own process creation. | 93 // Calculate the time that has elapsed from our own process creation. |
88 FILETIME creation_time = {}; | 94 FILETIME creation_time = {}; |
89 FILETIME ignore = {}; | 95 FILETIME ignore = {}; |
90 ::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore, | 96 ::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore, |
91 &ignore); | 97 &ignore); |
92 | 98 |
93 RecordPreReadExperimentTime( | 99 RecordPreReadExperimentTime( |
94 "Startup.BrowserMessageLoopStartTime", | 100 "Startup.BrowserMessageLoopStartTime", |
95 base::Time::Now() - base::Time::FromFileTime(creation_time)); | 101 base::Time::Now() - base::Time::FromFileTime(creation_time)); |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 crypto::EnsureNSPRInit(); | 318 crypto::EnsureNSPRInit(); |
313 } | 319 } |
314 } | 320 } |
315 }; | 321 }; |
316 | 322 |
317 // static | 323 // static |
318 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( | 324 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( |
319 const MainFunctionParams& parameters) { | 325 const MainFunctionParams& parameters) { |
320 return new BrowserMainPartsWin(parameters); | 326 return new BrowserMainPartsWin(parameters); |
321 } | 327 } |
OLD | NEW |