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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.cc

Issue 430643002: Correcting the version field in the Chrome-Proxy header to be the chromium build and patch number. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing bengr comments Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.cc
index 6130eda1b94f3017ca29bfdb067696a723d74a41..598c76b976538469067690f83abfb395a30ab310 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.cc
@@ -20,7 +20,8 @@
namespace data_reduction_proxy {
-// The version of the authentication protocol.
+// The empty version for the authentication protocol. Currently used by
+// Android webview.
const char kProtocolVersion[] = "0";
Lei Zhang 2014/08/01 19:11:57 name this kAndroidWebViewProtocolVersion and wrap
megjablon 2014/08/01 20:35:26 Done.
Lei Zhang 2014/08/01 20:43:15 Same for the header file?
megjablon 2014/08/01 21:00:30 Done.
// The clients supported by the data reduction proxy.
@@ -36,14 +37,12 @@ bool DataReductionProxyAuthRequestHandler::IsKeySetOnCommandLine() {
}
DataReductionProxyAuthRequestHandler::DataReductionProxyAuthRequestHandler(
+ const std::string& client,
+ const std::string& version,
DataReductionProxyParams* params)
: data_reduction_proxy_params_(params) {
- version_ = kProtocolVersion;
-#if defined(OS_ANDROID)
- client_ = kClientChromeAndroid;
-#elif defined(OS_IOS)
- client_ = kClientChromeIOS;
-#endif
+ client_ = client;
+ version_ = version;
Init();
}
@@ -126,11 +125,7 @@ void DataReductionProxyAuthRequestHandler::InitAuthentication(
<< "password: [" << credentials_ << "]";
}
-void DataReductionProxyAuthRequestHandler::SetKey(const std::string& key,
- const std::string& client,
- const std::string& version) {
- client_ = client;
- version_ = version;
+void DataReductionProxyAuthRequestHandler::SetKey(const std::string& key) {
if (!key.empty())
InitAuthentication(key);
}

Powered by Google App Engine
This is Rietveld 408576698