Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: chrome/browser/browser_main_win.cc

Issue 7610009: If no locale data files can be found, show a dialog and exit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: error Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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(const char* message, const char* title) {
87 string16 message_utf16 = ASCIIToUTF16(message);
88 string16 title_utf16 = ASCIIToUTF16(title);
89 ui::MessageBox(NULL, message_utf16, title_utf16,
90 MB_OK | MB_ICONERROR | MB_TOPMOST);
91 }
92
86 void RecordBrowserStartupTime() { 93 void RecordBrowserStartupTime() {
87 // Calculate the time that has elapsed from our own process creation. 94 // Calculate the time that has elapsed from our own process creation.
88 FILETIME creation_time = {}; 95 FILETIME creation_time = {};
89 FILETIME ignore = {}; 96 FILETIME ignore = {};
90 ::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore, 97 ::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore,
91 &ignore); 98 &ignore);
92 99
93 RecordPreReadExperimentTime( 100 RecordPreReadExperimentTime(
94 "Startup.BrowserMessageLoopStartTime", 101 "Startup.BrowserMessageLoopStartTime",
95 base::Time::Now() - base::Time::FromFileTime(creation_time)); 102 base::Time::Now() - base::Time::FromFileTime(creation_time));
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 crypto::EnsureNSPRInit(); 319 crypto::EnsureNSPRInit();
313 } 320 }
314 } 321 }
315 }; 322 };
316 323
317 // static 324 // static
318 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( 325 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts(
319 const MainFunctionParams& parameters) { 326 const MainFunctionParams& parameters) {
320 return new BrowserMainPartsWin(parameters); 327 return new BrowserMainPartsWin(parameters);
321 } 328 }
OLDNEW
« chrome/browser/browser_main.h ('K') | « chrome/browser/browser_main_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698