OLD | NEW |
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_retrieval_params.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_retrieval_params.h" |
6 | 6 |
7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/pref_service.h" |
9 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
11 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" | 12 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" |
12 #include "components/prefs/pref_service.h" | |
13 #include "components/variations/variations_associated_data.h" | 13 #include "components/variations/variations_associated_data.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // The trial group prefix for which an experiment is considered enabled. | 17 // The trial group prefix for which an experiment is considered enabled. |
18 const char kEnabled[] = "Enabled"; | 18 const char kEnabled[] = "Enabled"; |
19 | 19 |
20 // The minimum interval (in seconds) at which the config retrieval can occur. | 20 // The minimum interval (in seconds) at which the config retrieval can occur. |
21 const int kConfigFetchMinimumIntervalSeconds = 300; | 21 const int kConfigFetchMinimumIntervalSeconds = 300; |
22 | 22 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 NOTREACHED(); | 262 NOTREACHED(); |
263 } | 263 } |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 void DataReductionProxyConfigRetrievalParams::RefreshConfig() { | 267 void DataReductionProxyConfigRetrievalParams::RefreshConfig() { |
268 config_expiration_ = base::Time::Now() + config_expiration_interval_; | 268 config_expiration_ = base::Time::Now() + config_expiration_interval_; |
269 } | 269 } |
270 | 270 |
271 } // namespace data_reduction_proxy | 271 } // namespace data_reduction_proxy |
OLD | NEW |