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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h

Issue 473723002: Update data reduction proxy statistics prefs less often on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tooManyWritesPatch
Patch Set: Addressed bengr comments Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TE ST_UTILS_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TE ST_UTILS_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TE ST_UTILS_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TE ST_UTILS_H_
7 7
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/testing_pref_service.h" 10 #include "base/prefs/testing_pref_service.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void RegisterSyntheticFieldTrialCallback(bool proxy_enabled) { 160 void RegisterSyntheticFieldTrialCallback(bool proxy_enabled) {
161 proxy_enabled_ = proxy_enabled; 161 proxy_enabled_ = proxy_enabled;
162 } 162 }
163 163
164 TestingPrefServiceSimple pref_service_; 164 TestingPrefServiceSimple pref_service_;
165 scoped_ptr<DataReductionProxyConfigurator> configurator_; 165 scoped_ptr<DataReductionProxyConfigurator> configurator_;
166 scoped_ptr<DataReductionProxySettings> settings_; 166 scoped_ptr<DataReductionProxySettings> settings_;
167 scoped_ptr<TestDataReductionProxyParams> expected_params_; 167 scoped_ptr<TestDataReductionProxyParams> expected_params_;
168 base::Time last_update_time_; 168 base::Time last_update_time_;
169 bool proxy_enabled_; 169 bool proxy_enabled_;
170 #if defined(OS_ANDROID) || defined(OS_IOS)
171 base::TimeDelta commit_delay_ = base::TimeDelta();
172 #else
173 base::TimeDelta commit_delay_ = base::TimeDelta::FromMinutes(60);
174 #endif
175 scoped_ptr<DataReductionProxyStatisticsPrefs> statistics_prefs_;
170 }; 176 };
171 177
172 // Test implementations should be subclasses of an instantiation of this 178 // Test implementations should be subclasses of an instantiation of this
173 // class parameterized for whatever DataReductionProxySettings class 179 // class parameterized for whatever DataReductionProxySettings class
174 // is being tested. 180 // is being tested.
175 template <class C> 181 template <class C>
176 class ConcreteDataReductionProxySettingsTest 182 class ConcreteDataReductionProxySettingsTest
177 : public DataReductionProxySettingsTestBase { 183 : public DataReductionProxySettingsTestBase {
178 public: 184 public:
179 typedef MockDataReductionProxySettings<C> MockSettings; 185 typedef MockDataReductionProxySettings<C> MockSettings;
(...skipping 18 matching lines...) Expand all
198 response, 204 response,
199 result, 205 result,
200 success, 206 success,
201 expected_calls); 207 expected_calls);
202 } 208 }
203 }; 209 };
204 210
205 } // namespace data_reduction_proxy 211 } // namespace data_reduction_proxy
206 212
207 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS _TEST_UTILS_H_ 213 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS _TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698