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

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

Issue 9251026: Reinitialize LocalState's CommandLinePrefStore after about_flags updates the command line. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix presubmit checks, no code change Created 8 years, 11 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 | « no previous file | chrome/browser/policy/configuration_policy_pref_store.h » ('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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "chrome/browser/metrics/metrics_log.h" 51 #include "chrome/browser/metrics/metrics_log.h"
52 #include "chrome/browser/metrics/metrics_service.h" 52 #include "chrome/browser/metrics/metrics_service.h"
53 #include "chrome/browser/metrics/thread_watcher.h" 53 #include "chrome/browser/metrics/thread_watcher.h"
54 #include "chrome/browser/metrics/tracking_synchronizer.h" 54 #include "chrome/browser/metrics/tracking_synchronizer.h"
55 #include "chrome/browser/nacl_host/nacl_process_host.h" 55 #include "chrome/browser/nacl_host/nacl_process_host.h"
56 #include "chrome/browser/net/chrome_net_log.h" 56 #include "chrome/browser/net/chrome_net_log.h"
57 #include "chrome/browser/net/predictor.h" 57 #include "chrome/browser/net/predictor.h"
58 #include "chrome/browser/notifications/desktop_notification_service.h" 58 #include "chrome/browser/notifications/desktop_notification_service.h"
59 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 59 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
60 #include "chrome/browser/plugin_prefs.h" 60 #include "chrome/browser/plugin_prefs.h"
61 #include "chrome/browser/policy/browser_policy_connector.h"
62 #include "chrome/browser/prefs/pref_service.h" 61 #include "chrome/browser/prefs/pref_service.h"
63 #include "chrome/browser/prefs/pref_value_store.h" 62 #include "chrome/browser/prefs/pref_value_store.h"
64 #include "chrome/browser/prerender/prerender_field_trial.h" 63 #include "chrome/browser/prerender/prerender_field_trial.h"
65 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 64 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
66 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 65 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
67 #include "chrome/browser/process_singleton.h" 66 #include "chrome/browser/process_singleton.h"
68 #include "chrome/browser/profiles/profile.h" 67 #include "chrome/browser/profiles/profile.h"
69 #include "chrome/browser/profiles/profile_manager.h" 68 #include "chrome/browser/profiles/profile_manager.h"
70 #include "chrome/browser/search_engines/search_engine_type.h" 69 #include "chrome/browser/search_engines/search_engine_type.h"
71 #include "chrome/browser/search_engines/template_url.h" 70 #include "chrome/browser/search_engines/template_url.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 version_info.is_valid() ? version_info.Version() : "0"; 458 version_info.is_valid() ? version_info.Version() : "0";
460 GpuBlacklist* gpu_blacklist = new GpuBlacklist(chrome_version_string); 459 GpuBlacklist* gpu_blacklist = new GpuBlacklist(chrome_version_string);
461 bool succeed = gpu_blacklist->LoadGpuBlacklist( 460 bool succeed = gpu_blacklist->LoadGpuBlacklist(
462 gpu_blacklist_json.as_string(), GpuBlacklist::kCurrentOsOnly); 461 gpu_blacklist_json.as_string(), GpuBlacklist::kCurrentOsOnly);
463 DCHECK(succeed); 462 DCHECK(succeed);
464 GpuDataManager::GetInstance()->SetGpuBlacklist(gpu_blacklist); 463 GpuDataManager::GetInstance()->SetGpuBlacklist(gpu_blacklist);
465 } 464 }
466 465
467 #if defined(OS_MACOSX) 466 #if defined(OS_MACOSX)
468 OSStatus KeychainCallback(SecKeychainEvent keychain_event, 467 OSStatus KeychainCallback(SecKeychainEvent keychain_event,
469 SecKeychainCallbackInfo *info, void *context) { 468 SecKeychainCallbackInfo* info, void* context) {
470 return noErr; 469 return noErr;
471 } 470 }
472 #endif 471 #endif
473 472
474 #if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK) 473 #if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK)
475 void RegisterTranslateableItems(void) { 474 void RegisterTranslateableItems(void) {
476 struct { 475 struct {
477 const char* stock_id; 476 const char* stock_id;
478 int resource_id; 477 int resource_id;
479 } translations[] = { 478 } translations[] = {
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 first_run::CreateSentinel(); 1255 first_run::CreateSentinel();
1257 } 1256 }
1258 1257
1259 // TODO(viettrungluu): why don't we run this earlier? 1258 // TODO(viettrungluu): why don't we run this earlier?
1260 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) 1259 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs))
1261 WarnAboutMinimumSystemRequirements(); 1260 WarnAboutMinimumSystemRequirements();
1262 1261
1263 // Convert active labs into switches. Modifies the current command line. 1262 // Convert active labs into switches. Modifies the current command line.
1264 about_flags::ConvertFlagsToSwitches(local_state_, 1263 about_flags::ConvertFlagsToSwitches(local_state_,
1265 CommandLine::ForCurrentProcess()); 1264 CommandLine::ForCurrentProcess());
1265 local_state_->UpdateCommandLinePrefStore(CommandLine::ForCurrentProcess());
1266 1266
1267 // Reset the command line in the crash report details, since we may have 1267 // Reset the command line in the crash report details, since we may have
1268 // just changed it to include experiments. 1268 // just changed it to include experiments.
1269 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); 1269 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess());
1270 1270
1271 InitializeNetworkOptions(parsed_command_line()); 1271 InitializeNetworkOptions(parsed_command_line());
1272 InitializeURLRequestThrottlerManager(browser_process_->net_log()); 1272 InitializeURLRequestThrottlerManager(browser_process_->net_log());
1273 1273
1274 // Initialize histogram synchronizer system. This is a singleton and is used 1274 // Initialize histogram synchronizer system. This is a singleton and is used
1275 // for posting tasks via base::Bind. Its deleted when it goes out of scope. 1275 // for posting tasks via base::Bind. Its deleted when it goes out of scope.
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1953 if (base::win::GetVersion() <= base::win::VERSION_XP) 1953 if (base::win::GetVersion() <= base::win::VERSION_XP)
1954 uma_name += "_XP"; 1954 uma_name += "_XP";
1955 1955
1956 uma_name += "_PreRead"; 1956 uma_name += "_PreRead";
1957 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 1957 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
1958 AddPreReadHistogramTime(uma_name.c_str(), time); 1958 AddPreReadHistogramTime(uma_name.c_str(), time);
1959 } 1959 }
1960 #endif 1960 #endif
1961 #endif 1961 #endif
1962 } 1962 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/configuration_policy_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698