summaryrefslogtreecommitdiffstats
path: root/components/data_reduction_proxy
diff options
context:
space:
mode:
authorjeremyim <jeremyim@chromium.org>2015-07-15 15:41:15 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-15 22:41:54 +0000
commitbd6c7e4250b52351430090b2099e4567747ccc7d (patch)
tree6a1ccc17e19c9719c76eef249ec0c84773e1a8c2 /components/data_reduction_proxy
parent52511e46ac0f0c38f6c59a73b8a7c30fe014805f (diff)
downloadchromium_src-bd6c7e4250b52351430090b2099e4567747ccc7d.zip
chromium_src-bd6c7e4250b52351430090b2099e4567747ccc7d.tar.gz
chromium_src-bd6c7e4250b52351430090b2099e4567747ccc7d.tar.bz2
Rename a field in the Data Reduction Proxy ClientConfig proto to match
a name change on the service. Review URL: https://codereview.chromium.org/1229853003 Cr-Commit-Position: refs/heads/master@{#338940}
Diffstat (limited to 'components/data_reduction_proxy')
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc6
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc4
-rw-r--r--components/data_reduction_proxy/proto/client_config.proto11
5 files changed, 13 insertions, 12 deletions
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
index 7d93216..3ac319e 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
@@ -347,7 +347,7 @@ void DataReductionProxyConfigServiceClient::HandleResponse(
base::Time expiration_time;
if (succeeded) {
- expiration_time = config_parser::TimestampToTime(config.expire_time());
+ expiration_time = config_parser::TimestampToTime(config.refresh_time());
}
if (!use_local_config_ && succeeded) {
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
index 188c2df..a38496c 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
@@ -64,7 +64,7 @@ class RequestOptionsPopulator {
void PopulateResponse(ClientConfig* config) {
config->set_session_key("abcdef|1234-5678-12345678");
config_parser::TimetoTimestamp(expiration_time_,
- config->mutable_expire_time());
+ config->mutable_refresh_time());
expiration_time_ += increment_;
}
@@ -92,8 +92,8 @@ ClientConfig CreateConfig(const std::string& session_key,
ClientConfig config;
config.set_session_key(session_key);
- config.mutable_expire_time()->set_seconds(expire_seconds);
- config.mutable_expire_time()->set_nanos(expire_nanoseconds);
+ config.mutable_refresh_time()->set_seconds(expire_seconds);
+ config.mutable_refresh_time()->set_nanos(expire_nanoseconds);
ProxyServer* primary_proxy =
config.mutable_proxy_config()->add_http_proxy_servers();
primary_proxy->set_scheme(primary_scheme);
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
index 6a55084..eff059e 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
@@ -306,7 +306,7 @@ void DataReductionProxyRequestOptions::PopulateConfigResponse(
ComputeCredentials(now, &session, &credentials);
config->set_session_key(CreateLocalSessionKey(session, credentials));
config_parser::TimetoTimestamp(expiration_time,
- config->mutable_expire_time());
+ config->mutable_refresh_time());
}
void DataReductionProxyRequestOptions::SetCredentials(
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
index a48459f..6d373be 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options_unittest.cc
@@ -443,8 +443,8 @@ TEST_F(DataReductionProxyRequestOptionsTest, PopulateConfigResponse) {
EXPECT_EQ(
"0-1633771873-1633771873-1633771873|96bd72ec4a050ba60981743d41787768",
config.session_key());
- EXPECT_EQ(86400, config.expire_time().seconds());
- EXPECT_EQ(0, config.expire_time().nanos());
+ EXPECT_EQ(86400, config.refresh_time().seconds());
+ EXPECT_EQ(0, config.refresh_time().nanos());
}
} // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/proto/client_config.proto b/components/data_reduction_proxy/proto/client_config.proto
index 9cf7cbd..ab3c8af 100644
--- a/components/data_reduction_proxy/proto/client_config.proto
+++ b/components/data_reduction_proxy/proto/client_config.proto
@@ -13,11 +13,12 @@ message ClientConfig {
// An opaque per-session key assigned by the server which permits use of the
// Data Saver HTTP proxy servers.
optional string session_key = 1;
- // The time at which the secure_session_key is no longer valid. This is
- // enforced by the Data Saver service, and is provided to permit the client
- // to request a new session key prior to expiration.
- optional Timestamp expire_time = 2;
- // The DataSaver proxy configuration that is valid for the session.
+ // The time at which the client should request a new configuration. The
+ // session_key is guaranteed to be valid through this time and may be valid
+ // for some time thereafter.
+ optional Timestamp refresh_time = 2;
+ // The proxy configuration the client should use to connect to the Data Saver
+ // service.
optional ProxyConfig proxy_config = 3;
}