Index: components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h |
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h b/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h |
index 992b8b66e5e5d04435c02800d18ec686866f2c43..6706e8302002b6186d365d55949a0caef16dc39b 100644 |
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h |
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h |
@@ -38,6 +38,12 @@ class DataReductionProxyAuthRequestHandler { |
public: |
static bool IsKeySetOnCommandLine(); |
+ // Constructs a DataReductionProxyAuthRequestHandler object with the given |
+ // client, version, params, and network task runner. The Chromium |version| is |
+ // expected to be of the form "xx.xx.xx.xx". If it isn't of this form, |
+ // |build_number_| and |patch_number_| are set to empty strings and not |
+ // included in the header. http://crbug.com/410127 will change this so that |
+ // the version is retrieved inside this constructor. |
DataReductionProxyAuthRequestHandler( |
const std::string& client, |
const std::string& version, |
@@ -80,8 +86,14 @@ class DataReductionProxyAuthRequestHandler { |
FRIEND_TEST_ALL_PREFIXES(DataReductionProxyAuthRequestHandlerTest, |
Authorization); |
FRIEND_TEST_ALL_PREFIXES(DataReductionProxyAuthRequestHandlerTest, |
+ AuthorizationBogusVersion); |
+ FRIEND_TEST_ALL_PREFIXES(DataReductionProxyAuthRequestHandlerTest, |
AuthHashForSalt); |
+ // Returns the number at |index| of |version|. If |version| isn't of the form |
+ // xx.xx.xx.xx returns an empty string. |
+ std::string GetChromiumVersionComponent(std::string version, int index); |
+ |
// Stores the supplied key and sets up credentials suitable for authenticating |
// with the data reduction proxy. |
void InitAuthentication(const std::string& key); |
@@ -102,7 +114,8 @@ class DataReductionProxyAuthRequestHandler { |
// Name of the client and version of the data reduction proxy protocol to use. |
// Both live on the IO thread. |
std::string client_; |
- std::string version_; |
+ std::string build_number_; |
+ std::string patch_number_; |
// The last time the session was updated. Used to ensure that a session is |
// never used for more than twenty-four hours. |