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

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

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 #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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 if (is_first_run) { 272 if (is_first_run) {
273 #if defined(OS_WIN) 273 #if defined(OS_WIN)
274 // During first run we read the google_update registry key to find what 274 // During first run we read the google_update registry key to find what
275 // language the user selected when downloading the installer. This 275 // language the user selected when downloading the installer. This
276 // becomes our default language in the prefs. 276 // becomes our default language in the prefs.
277 // Other platforms obey the system locale. 277 // Other platforms obey the system locale.
278 std::wstring install_lang; 278 std::wstring install_lang;
279 if (GoogleUpdateSettings::GetLanguage(&install_lang)) { 279 if (GoogleUpdateSettings::GetLanguage(&install_lang)) {
280 local_state->SetString(prefs::kApplicationLocale, 280 local_state->SetString(prefs::kApplicationLocale,
281 WideToASCII(install_lang)); 281 base::WideToASCII(install_lang));
282 } 282 }
283 #endif // defined(OS_WIN) 283 #endif // defined(OS_WIN)
284 } 284 }
285 285
286 // If the local state file for the current profile doesn't exist and the 286 // If the local state file for the current profile doesn't exist and the
287 // parent profile command line flag is present, then we should inherit some 287 // parent profile command line flag is present, then we should inherit some
288 // local state from the parent profile. 288 // local state from the parent profile.
289 // Checking that the local state file for the current profile doesn't exist 289 // Checking that the local state file for the current profile doesn't exist
290 // is the most robust way to determine whether we need to inherit or not 290 // is the most robust way to determine whether we need to inherit or not
291 // since the parent profile command line flag can be present even when the 291 // since the parent profile command line flag can be present even when the
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 UMA_HISTOGRAM_ENUMERATION("NotifyOtherProcessOrCreate.Result", 1179 UMA_HISTOGRAM_ENUMERATION("NotifyOtherProcessOrCreate.Result",
1180 notify_result_, 1180 notify_result_,
1181 ProcessSingleton::NUM_NOTIFY_RESULTS); 1181 ProcessSingleton::NUM_NOTIFY_RESULTS);
1182 switch (notify_result_) { 1182 switch (notify_result_) {
1183 case ProcessSingleton::PROCESS_NONE: 1183 case ProcessSingleton::PROCESS_NONE:
1184 // No process already running, fall through to starting a new one. 1184 // No process already running, fall through to starting a new one.
1185 break; 1185 break;
1186 1186
1187 case ProcessSingleton::PROCESS_NOTIFIED: 1187 case ProcessSingleton::PROCESS_NOTIFIED:
1188 #if defined(OS_POSIX) && !defined(OS_MACOSX) 1188 #if defined(OS_POSIX) && !defined(OS_MACOSX)
1189 printf("%s\n", base::SysWideToNativeMB(UTF16ToWide( 1189 printf("%s\n", base::SysWideToNativeMB(base::UTF16ToWide(
1190 l10n_util::GetStringUTF16(IDS_USED_EXISTING_BROWSER))).c_str()); 1190 l10n_util::GetStringUTF16(IDS_USED_EXISTING_BROWSER))).c_str());
1191 #endif 1191 #endif
1192 // Having a differentiated return type for testing allows for tests to 1192 // Having a differentiated return type for testing allows for tests to
1193 // verify proper handling of some switches. When not testing, stick to 1193 // verify proper handling of some switches. When not testing, stick to
1194 // the standard Unix convention of returning zero when things went as 1194 // the standard Unix convention of returning zero when things went as
1195 // expected. 1195 // expected.
1196 if (parsed_command_line().HasSwitch(switches::kTestType)) 1196 if (parsed_command_line().HasSwitch(switches::kTestType))
1197 return chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED; 1197 return chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED;
1198 return content::RESULT_CODE_NORMAL_EXIT; 1198 return content::RESULT_CODE_NORMAL_EXIT;
1199 1199
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 if (base::win::GetVersion() <= base::win::VERSION_XP) 1797 if (base::win::GetVersion() <= base::win::VERSION_XP)
1798 uma_name += "_XP"; 1798 uma_name += "_XP";
1799 1799
1800 uma_name += "_PreRead_"; 1800 uma_name += "_PreRead_";
1801 uma_name += pre_read_percentage; 1801 uma_name += pre_read_percentage;
1802 AddPreReadHistogramTime(uma_name.c_str(), time); 1802 AddPreReadHistogramTime(uma_name.c_str(), time);
1803 } 1803 }
1804 #endif 1804 #endif
1805 #endif 1805 #endif
1806 } 1806 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_keyevents_browsertest.cc ('k') | chrome/browser/chromeos/login/version_info_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698