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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc

Issue 1076853003: Refactor net::BackoffEntry to not require subclassing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address pneubeck's review comments Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig_service_client.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig_service_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 void DataReductionProxyConfigServiceClient::SetConfigRefreshTimer( 150 void DataReductionProxyConfigServiceClient::SetConfigRefreshTimer(
151 const base::TimeDelta& delay) { 151 const base::TimeDelta& delay) {
152 DCHECK(delay >= base::TimeDelta()); 152 DCHECK(delay >= base::TimeDelta());
153 config_refresh_timer_.Stop(); 153 config_refresh_timer_.Stop();
154 config_refresh_timer_.Start( 154 config_refresh_timer_.Start(
155 FROM_HERE, delay, this, 155 FROM_HERE, delay, this,
156 &DataReductionProxyConfigServiceClient::RetrieveConfig); 156 &DataReductionProxyConfigServiceClient::RetrieveConfig);
157 } 157 }
158 158
159 base::Time DataReductionProxyConfigServiceClient::Now() const { 159 base::Time DataReductionProxyConfigServiceClient::Now() {
160 return base::Time::Now(); 160 return base::Time::Now();
161 } 161 }
162 162
163 std::string 163 std::string
164 DataReductionProxyConfigServiceClient::ConstructStaticResponse() const { 164 DataReductionProxyConfigServiceClient::ConstructStaticResponse() const {
165 std::string response; 165 std::string response;
166 scoped_ptr<base::DictionaryValue> values(new base::DictionaryValue()); 166 scoped_ptr<base::DictionaryValue> values(new base::DictionaryValue());
167 params_->PopulateConfigResponse(values.get()); 167 params_->PopulateConfigResponse(values.get());
168 request_options_->PopulateConfigResponse(values.get()); 168 request_options_->PopulateConfigResponse(values.get());
169 base::JSONWriter::Write(values.get(), &response); 169 base::JSONWriter::Write(values.get(), &response);
170 170
171 return response; 171 return response;
172 } 172 }
173 173
174 } // namespace data_reduction_proxy 174 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698