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

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

Issue 549153003: Dev finch trial of the data reduction proxy overrides both the primary and the fallback hosts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 template <class C> 57 template <class C>
58 class MockDataReductionProxySettings : public C { 58 class MockDataReductionProxySettings : public C {
59 public: 59 public:
60 MockDataReductionProxySettings<C>() : DataReductionProxySettings( 60 MockDataReductionProxySettings<C>() : DataReductionProxySettings(
61 new TestDataReductionProxyParams( 61 new TestDataReductionProxyParams(
62 DataReductionProxyParams::kAllowed | 62 DataReductionProxyParams::kAllowed |
63 DataReductionProxyParams::kFallbackAllowed | 63 DataReductionProxyParams::kFallbackAllowed |
64 DataReductionProxyParams::kPromoAllowed, 64 DataReductionProxyParams::kPromoAllowed,
65 TestDataReductionProxyParams::HAS_EVERYTHING & 65 TestDataReductionProxyParams::HAS_EVERYTHING &
66 ~TestDataReductionProxyParams::HAS_DEV_ORIGIN)) {} 66 ~TestDataReductionProxyParams::HAS_DEV_ORIGIN &
67 ~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN)) {}
67 MockDataReductionProxySettings<C>(int flags) 68 MockDataReductionProxySettings<C>(int flags)
68 : C(new TestDataReductionProxyParams(flags, 69 : C(new TestDataReductionProxyParams(flags,
69 TestDataReductionProxyParams::HAS_EVERYTHING & 70 TestDataReductionProxyParams::HAS_EVERYTHING &
70 ~TestDataReductionProxyParams::HAS_DEV_ORIGIN)) {} 71 ~TestDataReductionProxyParams::HAS_DEV_ORIGIN &
72 ~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN)) {}
71 MOCK_METHOD0(GetURLFetcherForAvailabilityCheck, net::URLFetcher*()); 73 MOCK_METHOD0(GetURLFetcherForAvailabilityCheck, net::URLFetcher*());
72 MOCK_METHOD0(GetURLFetcherForWarmup, net::URLFetcher*()); 74 MOCK_METHOD0(GetURLFetcherForWarmup, net::URLFetcher*());
73 MOCK_METHOD0(GetOriginalProfilePrefs, PrefService*()); 75 MOCK_METHOD0(GetOriginalProfilePrefs, PrefService*());
74 MOCK_METHOD0(GetLocalStatePrefs, PrefService*()); 76 MOCK_METHOD0(GetLocalStatePrefs, PrefService*());
75 MOCK_METHOD3(LogProxyState, void( 77 MOCK_METHOD3(LogProxyState, void(
76 bool enabled, bool restricted, bool at_startup)); 78 bool enabled, bool restricted, bool at_startup));
77 MOCK_METHOD1(RecordProbeURLFetchResult, 79 MOCK_METHOD1(RecordProbeURLFetchResult,
78 void(ProbeURLFetchResult result)); 80 void(ProbeURLFetchResult result));
79 MOCK_METHOD1(RecordStartupState, 81 MOCK_METHOD1(RecordStartupState,
80 void(ProxyStartupState state)); 82 void(ProxyStartupState state));
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 response, 200 response,
199 result, 201 result,
200 success, 202 success,
201 expected_calls); 203 expected_calls);
202 } 204 }
203 }; 205 };
204 206
205 } // namespace data_reduction_proxy 207 } // namespace data_reduction_proxy
206 208
207 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS _TEST_UTILS_H_ 209 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS _TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698