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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 10916341: Ignore --use-spdy=off command line option if spdy.disabled pref is (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 157062)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -59,6 +59,7 @@
#include "chrome/browser/performance_monitor/performance_monitor.h"
#include "chrome/browser/performance_monitor/startup_timer.h"
#include "chrome/browser/plugin_prefs.h"
+#include "chrome/browser/policy/policy_service.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/pref_value_store.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
@@ -161,6 +162,10 @@
#include "chrome/browser/mac/keystone_glue.h"
#endif
+#if defined(ENABLE_CONFIGURATION_POLICY)
+#include "policy/policy_constants.h"
+#endif
+
#if defined(ENABLE_RLZ)
#include "chrome/browser/rlz/rlz.h"
#endif
@@ -201,13 +206,24 @@
}
}
-void InitializeNetworkOptions(const CommandLine& parsed_command_line) {
+void InitializeNetworkOptions(const CommandLine& parsed_command_line,
+ policy::PolicyService* policy_service) {
if (parsed_command_line.HasSwitch(switches::kEnableFileCookies)) {
// Enable cookie storage for file:// URLs. Must do this before the first
// Profile (and therefore the first CookieMonster) is created.
net::CookieMonster::EnableFileScheme();
}
+#if defined(ENABLE_CONFIGURATION_POLICY)
+ bool has_spdy_policy = policy_service->GetPolicies(
+ policy::POLICY_DOMAIN_CHROME,
+ std::string()).Get(policy::key::kDisableSpdy) != NULL;
+ // If "spdy.disabled" preference is controlled via policy, then skip use-spdy
+ // command line flags.
+ if (has_spdy_policy)
+ return;
+#endif // ENABLE_CONFIGURATION_POLICY
+
if (parsed_command_line.HasSwitch(switches::kEnableIPPooling))
net::SpdySessionPool::enable_ip_pooling(true);
@@ -839,7 +855,8 @@
chrome::VersionInfo::GetVersionStringModifier());
#endif
- InitializeNetworkOptions(parsed_command_line());
+ InitializeNetworkOptions(parsed_command_line(),
+ browser_process_->policy_service());
// Initialize tracking synchronizer system.
tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698