summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/common.gypi11
-rw-r--r--chrome/app/generated_resources.grd8
-rw-r--r--chrome/browser/about_flags.cc8
-rw-r--r--chrome/browser/chrome_content_browser_client.cc2
-rw-r--r--chrome/browser/io_thread.cc18
-rw-r--r--chrome/browser/io_thread.h2
-rw-r--r--chrome/browser/prefs/command_line_pref_store.cc2
-rw-r--r--chrome/browser/profiles/profile.cc2
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h4
-rw-r--r--chrome/common/pref_names.cc4
-rw-r--r--chrome/common/pref_names.h4
-rw-r--r--chrome/renderer/page_load_histograms.cc11
13 files changed, 51 insertions, 29 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 49c28b9..6ac534d 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -404,6 +404,9 @@
# Managed users are enabled by default.
'enable_managed_users%': 1,
+ 'spdy_proxy_auth_origin%' : '',
+ 'spdy_proxy_auth_property%' : '',
+
'conditions': [
# TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
# the 'conditions' clause. Initial attempts resulted in chromium and
@@ -740,6 +743,8 @@
'google_default_client_id%': '<(google_default_client_id)',
'google_default_client_secret%': '<(google_default_client_secret)',
'enable_managed_users%': '<(enable_managed_users)',
+ 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
+ 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
# Use system ffmpeg instead of bundled one.
'use_system_ffmpeg%': 0,
@@ -2001,6 +2006,12 @@
['enable_managed_users==1', {
'defines': ['ENABLE_MANAGED_USERS=1'],
}],
+ ['spdy_proxy_auth_origin != ""', {
+ 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
+ }],
+ ['spdy_proxy_auth_property != ""', {
+ 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
+ }],
], # conditions for 'target_defaults'
'target_conditions': [
['enable_wexit_time_destructors==1', {
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index dfe0631..f54cfbf 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7155,11 +7155,11 @@ Keep your key file in a safe place. You will need it to create new versions of y
An app to develop apps / extensions.
</message>
<if expr="pp_ifdef('android')">
- <message name="IDS_FLAGS_ENABLE_SPDY_PROXY_NAME" desc="Name of the flag to enable SPDY proxy.">
- Enable SPDY proxy.
+ <message name="IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_NAME" desc="Name of the flag to enable SPDY proxy authentication.">
+ Enable SPDY proxy authentication.
</message>
- <message name="IDS_FLAGS_ENABLE_SPDY_PROXY_DESCRIPTION" desc="Description of flag to enable SPDY proxy.">
- <!-- TODO Add description of enable SPDY proxy flag. -->
+ <message name="IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_DESCRIPTION" desc="Description of flag to enable SPDY proxy authentication.">
+ <!-- TODO Add description of enable SPDY proxy auth flag. -->
</message>
</if>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 59481ce..14c1b0c 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -281,11 +281,11 @@ const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
const Experiment kExperiments[] = {
#if defined(OS_ANDROID)
{
- "enable-spdy-proxy",
- IDS_FLAGS_ENABLE_SPDY_PROXY_NAME,
- IDS_FLAGS_ENABLE_SPDY_PROXY_DESCRIPTION,
+ "enable-spdy-proxy-auth",
+ IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_NAME,
+ IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_DESCRIPTION,
kOsAndroid,
- SINGLE_VALUE_TYPE(switches::kEnableSpdyProxy)
+ SINGLE_VALUE_TYPE(switches::kEnableSpdyProxyAuth)
},
#endif
{
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index e1908ec..183f52f 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1123,7 +1123,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kProfilingFlush,
switches::kRecordMode,
switches::kSilentDumpOnDCHECK,
- switches::kSpdyProxyOrigin,
+ switches::kSpdyProxyAuthOrigin,
switches::kWhitelistedExtensionID,
};
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 33bf95b..ebefa50 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -481,9 +481,13 @@ void IOThread::Init() {
globals_->cert_verifier.reset(net::CertVerifier::CreateDefault());
globals_->transport_security_state.reset(new net::TransportSecurityState());
globals_->ssl_config_service = GetSSLConfigService();
- if (command_line.HasSwitch(switches::kSpdyProxyOrigin)) {
- spdyproxy_origin_ =
- command_line.GetSwitchValueASCII(switches::kSpdyProxyOrigin);
+ if (command_line.HasSwitch(switches::kSpdyProxyAuthOrigin)) {
+ spdyproxy_auth_origin_ =
+ command_line.GetSwitchValueASCII(switches::kSpdyProxyAuthOrigin);
+ } else {
+#if defined(SPDY_PROXY_AUTH_ORIGIN)
+ spdyproxy_auth_origin_ = SPDY_PROXY_AUTH_ORIGIN;
+#endif
}
globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory(
globals_->host_resolver.get()));
@@ -743,7 +747,7 @@ void IOThread::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterStringPref(prefs::kAuthServerWhitelist, "");
registry->RegisterStringPref(prefs::kAuthNegotiateDelegateWhitelist, "");
registry->RegisterStringPref(prefs::kGSSAPILibraryName, "");
- registry->RegisterStringPref(prefs::kSpdyProxyOrigin, "");
+ registry->RegisterStringPref(prefs::kSpdyProxyAuthOrigin, "");
registry->RegisterBooleanPref(prefs::kEnableReferrers, true);
registry->RegisterInt64Pref(prefs::kHttpReceivedContentLength, 0);
registry->RegisterInt64Pref(prefs::kHttpOriginalContentLength, 0);
@@ -776,8 +780,8 @@ net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory(
resolver, gssapi_library_name_, negotiate_disable_cname_lookup_,
negotiate_enable_port_));
- if (!spdyproxy_origin_.empty()) {
- GURL origin_url(spdyproxy_origin_);
+ if (!spdyproxy_auth_origin_.empty()) {
+ GURL origin_url(spdyproxy_auth_origin_);
if (origin_url.is_valid()) {
registry_factory->RegisterSchemeFactory(
"spdyproxy",
@@ -785,7 +789,7 @@ net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory(
} else {
LOG(WARNING) << "Skipping creation of SpdyProxy auth handler since "
<< "authorized origin is invalid: "
- << spdyproxy_origin_;
+ << spdyproxy_auth_origin_;
}
}
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h
index a1f1c14..c6d2dba 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -281,7 +281,7 @@ class IOThread : public content::BrowserThreadDelegate {
std::string auth_server_whitelist_;
std::string auth_delegate_whitelist_;
std::string gssapi_library_name_;
- std::string spdyproxy_origin_;
+ std::string spdyproxy_auth_origin_;
// This is an instance of the default SSLConfigServiceManager for the current
// platform and it gets SSL preferences from local_state object.
diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc
index 6321593..8332927 100644
--- a/chrome/browser/prefs/command_line_pref_store.cc
+++ b/chrome/browser/prefs/command_line_pref_store.cc
@@ -24,7 +24,7 @@ const CommandLinePrefStore::StringSwitchToPreferenceMapEntry
{ switches::kAuthNegotiateDelegateWhitelist,
prefs::kAuthNegotiateDelegateWhitelist },
{ switches::kGSSAPILibraryName, prefs::kGSSAPILibraryName },
- { switches::kSpdyProxyOrigin, prefs::kSpdyProxyOrigin },
+ { switches::kSpdyProxyAuthOrigin, prefs::kSpdyProxyAuthOrigin },
{ switches::kDiskCacheDir, prefs::kDiskCacheDir },
{ switches::kSSLVersionMin, prefs::kSSLVersionMin },
{ switches::kSSLVersionMax, prefs::kSSLVersionMax },
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index cb98f45..0302bf8 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -104,7 +104,7 @@ void Profile::RegisterUserPrefs(PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kDevToolsRemoteEnabled,
false,
PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterBooleanPref(prefs::kSpdyProxyEnabled,
+ registry->RegisterBooleanPref(prefs::kSpdyProxyAuthEnabled,
false,
PrefRegistrySyncable::UNSYNCABLE_PREF);
#endif
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 282c556..4adbd2e 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1234,7 +1234,7 @@ const char kSimulateOutdated[] = "simulate-outdated";
const char kSocketReusePolicy[] = "socket-reuse-policy";
// Origin for which SpdyProxy authentication is supported.
-const char kSpdyProxyOrigin[] = "spdy-proxy-origin";
+const char kSpdyProxyAuthOrigin[] = "spdy-proxy-auth-origin";
// Speculative resource prefetching.
const char kSpeculativeResourcePrefetching[] =
@@ -1410,7 +1410,7 @@ const char kPluginsMetadataServerURL[] = "plugins-metadata-server-url";
#if defined(OS_ANDROID)
// Enable SPDY proxy.
-const char kEnableSpdyProxy[] = "enable-spdy-proxy";
+const char kEnableSpdyProxyAuth[] = "enable-spdy-proxy-auth";
// Pops the translate infobar if possible.
const char kEnableTranslate[] = "enable-translate";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 14cfda5..7c685f0 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -330,7 +330,7 @@ extern const char kSocketReusePolicy[];
extern const char kSpeculativeResourcePrefetching[];
extern const char kSpeculativeResourcePrefetchingDisabled[];
extern const char kSpeculativeResourcePrefetchingLearning[];
-extern const char kSpdyProxyOrigin[];
+extern const char kSpdyProxyAuthOrigin[];
extern const char kSpeculativeResourcePrefetchingEnabled[];
extern const char kSSLVersionMax[];
extern const char kSSLVersionMin[];
@@ -381,7 +381,7 @@ extern const char kPluginsMetadataServerURL[];
#endif
#if defined(OS_ANDROID)
-extern const char kEnableSpdyProxy[];
+extern const char kEnableSpdyProxyAuth[];
extern const char kEnableTranslate[];
extern const char kTabletUI[];
#endif
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 3451ffc..b99aaed 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1694,7 +1694,7 @@ const char kDevToolsVSplitLocation[] = "devtools.v_split_location";
#if defined(OS_ANDROID)
// A boolean specifying whether a SPDY proxy is enabled.
-const char kSpdyProxyEnabled[] = "spdy_proxy.enabled";
+const char kSpdyProxyAuthEnabled[] = "spdy_proxy.enabled";
#endif
// 64-bit integer serialization of the base::Time when the last sync occurred.
@@ -1916,7 +1916,7 @@ const char kGSSAPILibraryName[] = "auth.gssapi_library_name";
// String that specifies the origin allowed to use SpdyProxy
// authentication, if any.
-const char kSpdyProxyOrigin[] = "auth.spdyproxy.origin";
+const char kSpdyProxyAuthOrigin[] = "auth.spdyproxy.origin";
// Boolean that specifies whether to allow basic auth prompting on cross-
// domain sub-content requests.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 56dea39..0bccd13 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -590,7 +590,7 @@ extern const char kDevToolsRemoteEnabled[];
extern const char kDevToolsVSplitLocation[];
#if defined(OS_ANDROID)
// Used by Chrome Mobile.
-extern const char kSpdyProxyEnabled[];
+extern const char kSpdyProxyAuthEnabled[];
#endif
extern const char kSyncLastSyncedTime[];
extern const char kSyncHasSetupCompleted[];
@@ -752,7 +752,7 @@ extern const char kEnableAuthNegotiatePort[];
extern const char kAuthServerWhitelist[];
extern const char kAuthNegotiateDelegateWhitelist[];
extern const char kGSSAPILibraryName[];
-extern const char kSpdyProxyOrigin[];
+extern const char kSpdyProxyAuthOrigin[];
extern const char kAllowCrossOriginAuthPrompt[];
extern const char kBuiltInDnsClientEnabled[];
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc
index cd929b7..e78ebd9 100644
--- a/chrome/renderer/page_load_histograms.cc
+++ b/chrome/renderer/page_load_histograms.cc
@@ -321,9 +321,16 @@ void PageLoadHistograms::Dump(WebFrame* frame) {
break;
}
+ bool spdy_proxy_auth_origin_is_set = false;
+#if defined(SPDY_PROXY_AUTH_ORIGIN)
+ spdy_proxy_auth_origin_is_set = true;
+#else
+ spdy_proxy_auth_origin_is_set = CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kSpdyProxyAuthOrigin);
+#endif
+
if (document_state->was_fetched_via_proxy() &&
- document_state->was_fetched_via_spdy() &&
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kSpdyProxyOrigin)) {
+ document_state->was_fetched_via_spdy() && spdy_proxy_auth_origin_is_set) {
UMA_HISTOGRAM_ENUMERATION(
"PLT.Abandoned_SpdyProxy", abandoned_page ? 1 : 0, 2);
PLT_HISTOGRAM("PLT.BeginToFinishDoc_SpdyProxy", begin_to_finish_doc);