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

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

Issue 10698095: Add dummy implementation of about_flags for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Nico's comments Created 8 years, 5 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 | « chrome/browser/about_flags_android.cc ('k') | chrome/browser/sync/profile_sync_service.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/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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 parsed_command_line().GetSwitchValuePath( 1241 parsed_command_line().GetSwitchValuePath(
1242 switches::kProfilingOutputFile)); 1242 switches::kProfilingOutputFile));
1243 } 1243 }
1244 1244
1245 local_state_ = InitializeLocalState(parsed_command_line(), is_first_run_); 1245 local_state_ = InitializeLocalState(parsed_command_line(), is_first_run_);
1246 1246
1247 // These members must be initialized before returning from this function. 1247 // These members must be initialized before returning from this function.
1248 master_prefs_.reset(new first_run::MasterPrefs); 1248 master_prefs_.reset(new first_run::MasterPrefs);
1249 browser_creator_.reset(new StartupBrowserCreator); 1249 browser_creator_.reset(new StartupBrowserCreator);
1250 1250
1251 #if !defined(OS_ANDROID)
1252 // Convert active labs into switches. This needs to be done before 1251 // Convert active labs into switches. This needs to be done before
1253 // ResourceBundle::InitSharedInstanceWithLocale as some loaded resources are 1252 // ResourceBundle::InitSharedInstanceWithLocale as some loaded resources are
1254 // affected by experiment flags (--touch-optimized-ui in particular). Not 1253 // affected by experiment flags (--touch-optimized-ui in particular). Not
1255 // needed on Android as there aren't experimental flags. 1254 // needed on Android as there aren't experimental flags.
1256 about_flags::ConvertFlagsToSwitches(local_state_, 1255 about_flags::ConvertFlagsToSwitches(local_state_,
1257 CommandLine::ForCurrentProcess()); 1256 CommandLine::ForCurrentProcess());
1258 #endif
1259 local_state_->UpdateCommandLinePrefStore(CommandLine::ForCurrentProcess()); 1257 local_state_->UpdateCommandLinePrefStore(CommandLine::ForCurrentProcess());
1260 1258
1261 // Reset the command line in the crash report details, since we may have 1259 // Reset the command line in the crash report details, since we may have
1262 // just changed it to include experiments. 1260 // just changed it to include experiments.
1263 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); 1261 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess());
1264 1262
1265 // If we're running tests (ui_task is non-null), then the ResourceBundle 1263 // If we're running tests (ui_task is non-null), then the ResourceBundle
1266 // has already been initialized. 1264 // has already been initialized.
1267 if (parameters().ui_task) { 1265 if (parameters().ui_task) {
1268 browser_process_->SetApplicationLocale("en-US"); 1266 browser_process_->SetApplicationLocale("en-US");
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) 1746 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD)
1749 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { 1747 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) {
1750 FilePath path = 1748 FilePath path =
1751 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); 1749 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint);
1752 printing::PrintedDocument::set_debug_dump_path(path); 1750 printing::PrintedDocument::set_debug_dump_path(path);
1753 } 1751 }
1754 #endif 1752 #endif
1755 1753
1756 HandleTestParameters(parsed_command_line()); 1754 HandleTestParameters(parsed_command_line());
1757 RecordBreakpadStatusUMA(browser_process_->metrics_service()); 1755 RecordBreakpadStatusUMA(browser_process_->metrics_service());
1758 #if !defined(OS_ANDROID)
1759 about_flags::RecordUMAStatistics(local_state_); 1756 about_flags::RecordUMAStatistics(local_state_);
1760 #endif
1761 LanguageUsageMetrics::RecordAcceptLanguages( 1757 LanguageUsageMetrics::RecordAcceptLanguages(
1762 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); 1758 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
1763 LanguageUsageMetrics::RecordApplicationLanguage( 1759 LanguageUsageMetrics::RecordApplicationLanguage(
1764 browser_process_->GetApplicationLocale()); 1760 browser_process_->GetApplicationLocale());
1765 1761
1766 // The extension service may be available at this point. If the command line 1762 // The extension service may be available at this point. If the command line
1767 // specifies --uninstall-extension, attempt the uninstall extension startup 1763 // specifies --uninstall-extension, attempt the uninstall extension startup
1768 // action. 1764 // action.
1769 if (parsed_command_line().HasSwitch(switches::kUninstallExtension)) { 1765 if (parsed_command_line().HasSwitch(switches::kUninstallExtension)) {
1770 ExtensionsStartupUtil ext_startup_util; 1766 ExtensionsStartupUtil ext_startup_util;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 if (base::win::GetVersion() <= base::win::VERSION_XP) 2029 if (base::win::GetVersion() <= base::win::VERSION_XP)
2034 uma_name += "_XP"; 2030 uma_name += "_XP";
2035 2031
2036 uma_name += "_PreRead_"; 2032 uma_name += "_PreRead_";
2037 uma_name += pre_read_percentage; 2033 uma_name += pre_read_percentage;
2038 AddPreReadHistogramTime(uma_name.c_str(), time); 2034 AddPreReadHistogramTime(uma_name.c_str(), time);
2039 } 2035 }
2040 #endif 2036 #endif
2041 #endif 2037 #endif
2042 } 2038 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags_android.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698