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

Side by Side Diff: chrome/app/chrome_main_delegate.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
« no previous file with comments | « ash/test/test_suite.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 process_type == switches::kPpapiPluginProcess); 607 process_type == switches::kPpapiPluginProcess);
608 608
609 // TODO(markusheintz): The command line flag --lang is actually processed 609 // TODO(markusheintz): The command line flag --lang is actually processed
610 // by the CommandLinePrefStore, and made available through the PrefService 610 // by the CommandLinePrefStore, and made available through the PrefService
611 // via the preference prefs::kApplicationLocale. The browser process uses 611 // via the preference prefs::kApplicationLocale. The browser process uses
612 // the --lang flag to pass the value of the PrefService in here. Maybe 612 // the --lang flag to pass the value of the PrefService in here. Maybe
613 // this value could be passed in a different way. 613 // this value could be passed in a different way.
614 const std::string locale = 614 const std::string locale =
615 command_line.GetSwitchValueASCII(switches::kLang); 615 command_line.GetSwitchValueASCII(switches::kLang);
616 const std::string loaded_locale = 616 const std::string loaded_locale =
617 ResourceBundle::InitSharedInstanceWithLocale(locale); 617 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL);
618 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << 618 CHECK(!loaded_locale.empty()) << "Locale could not be found for " <<
619 locale; 619 locale;
620 620
621 #if defined(OS_MACOSX) 621 #if defined(OS_MACOSX)
622 // Update the process name (need resources to get the strings, so 622 // Update the process name (need resources to get the strings, so
623 // only do this when ResourcesBundle has been initialized). 623 // only do this when ResourcesBundle has been initialized).
624 SetMacProcessName(command_line); 624 SetMacProcessName(command_line);
625 #endif // defined(OS_MACOSX) 625 #endif // defined(OS_MACOSX)
626 } 626 }
627 627
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 #if defined(USE_LINUX_BREAKPAD) 725 #if defined(USE_LINUX_BREAKPAD)
726 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets 726 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
727 // this up for the browser process in a different manner. 727 // this up for the browser process in a different manner.
728 InitCrashReporter(); 728 InitCrashReporter();
729 #endif 729 #endif
730 730
731 InitializeChromeContentClient(process_type); 731 InitializeChromeContentClient(process_type);
732 } 732 }
733 #endif // OS_MACOSX 733 #endif // OS_MACOSX
OLDNEW
« no previous file with comments | « ash/test/test_suite.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698