Chromium Code Reviews

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

Issue 176843022: Move UTF16ToASCII, remove WideToASCII. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | 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 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 226 matching lines...)
237 // locale dll to load. This also causes local state prefs to be registered. 237 // locale dll to load. This also causes local state prefs to be registered.
238 PrefService* local_state = g_browser_process->local_state(); 238 PrefService* local_state = g_browser_process->local_state();
239 DCHECK(local_state); 239 DCHECK(local_state);
240 240
241 #if defined(OS_WIN) 241 #if defined(OS_WIN)
242 if (first_run::IsChromeFirstRun()) { 242 if (first_run::IsChromeFirstRun()) {
243 // During first run we read the google_update registry key to find what 243 // During first run we read the google_update registry key to find what
244 // language the user selected when downloading the installer. This 244 // language the user selected when downloading the installer. This
245 // becomes our default language in the prefs. 245 // becomes our default language in the prefs.
246 // Other platforms obey the system locale. 246 // Other platforms obey the system locale.
247 std::wstring install_lang; 247 base::string16 install_lang;
248 if (GoogleUpdateSettings::GetLanguage(&install_lang)) { 248 if (GoogleUpdateSettings::GetLanguage(&install_lang)) {
249 local_state->SetString(prefs::kApplicationLocale, 249 local_state->SetString(prefs::kApplicationLocale,
250 WideToASCII(install_lang)); 250 base::UTF16ToASCII(install_lang));
251 } 251 }
252 } 252 }
253 #endif // defined(OS_WIN) 253 #endif // defined(OS_WIN)
254 254
255 // If the local state file for the current profile doesn't exist and the 255 // If the local state file for the current profile doesn't exist and the
256 // parent profile command line flag is present, then we should inherit some 256 // parent profile command line flag is present, then we should inherit some
257 // local state from the parent profile. 257 // local state from the parent profile.
258 // Checking that the local state file for the current profile doesn't exist 258 // Checking that the local state file for the current profile doesn't exist
259 // is the most robust way to determine whether we need to inherit or not 259 // is the most robust way to determine whether we need to inherit or not
260 // since the parent profile command line flag can be present even when the 260 // since the parent profile command line flag can be present even when the
(...skipping 1420 matching lines...)
1681 chromeos::CrosSettings::Shutdown(); 1681 chromeos::CrosSettings::Shutdown();
1682 #endif 1682 #endif
1683 #endif 1683 #endif
1684 } 1684 }
1685 1685
1686 // Public members: 1686 // Public members:
1687 1687
1688 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1688 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1689 chrome_extra_parts_.push_back(parts); 1689 chrome_extra_parts_.push_back(parts);
1690 } 1690 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model_unittest.cc ('k') | chrome/browser/chromeos/login/supervised_user_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine