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

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

Issue 10270023: Add new ResourceBundle::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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) 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.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 // needed when loading the MainMenu.nib and the language doesn't depend on 1273 // needed when loading the MainMenu.nib and the language doesn't depend on
1274 // anything since it comes from Cocoa. 1274 // anything since it comes from Cocoa.
1275 #if defined(OS_MACOSX) 1275 #if defined(OS_MACOSX)
1276 browser_process_->SetApplicationLocale(l10n_util::GetLocaleOverride()); 1276 browser_process_->SetApplicationLocale(l10n_util::GetLocaleOverride());
1277 #else 1277 #else
1278 const std::string locale = 1278 const std::string locale =
1279 local_state_->GetString(prefs::kApplicationLocale); 1279 local_state_->GetString(prefs::kApplicationLocale);
1280 // On a POSIX OS other than ChromeOS, the parameter that is passed to the 1280 // On a POSIX OS other than ChromeOS, the parameter that is passed to the
1281 // method InitSharedInstance is ignored. 1281 // method InitSharedInstance is ignored.
1282 const std::string loaded_locale = 1282 const std::string loaded_locale =
1283 ResourceBundle::InitSharedInstanceWithLocale(locale); 1283 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL);
1284 if (loaded_locale.empty() && 1284 if (loaded_locale.empty() &&
1285 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { 1285 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) {
1286 ShowMissingLocaleMessageBox(); 1286 ShowMissingLocaleMessageBox();
1287 return chrome::RESULT_CODE_MISSING_DATA; 1287 return chrome::RESULT_CODE_MISSING_DATA;
1288 } 1288 }
1289 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; 1289 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
1290 browser_process_->SetApplicationLocale(loaded_locale); 1290 browser_process_->SetApplicationLocale(loaded_locale);
1291 1291
1292 FilePath resources_pack_path; 1292 FilePath resources_pack_path;
1293 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 1293 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 if (base::win::GetVersion() <= base::win::VERSION_XP) 1990 if (base::win::GetVersion() <= base::win::VERSION_XP)
1991 uma_name += "_XP"; 1991 uma_name += "_XP";
1992 1992
1993 uma_name += "_PreRead_"; 1993 uma_name += "_PreRead_";
1994 uma_name += pre_read_percentage; 1994 uma_name += pre_read_percentage;
1995 AddPreReadHistogramTime(uma_name.c_str(), time); 1995 AddPreReadHistogramTime(uma_name.c_str(), time);
1996 } 1996 }
1997 #endif 1997 #endif
1998 #endif 1998 #endif
1999 } 1999 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | chrome/browser/chrome_browser_main_extra_parts_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698