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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h

Issue 59113012: Removed SpdyProxyAuth.State histogram (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 7 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ 5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_
6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Metrics methods. Subclasses should override if they wish to provide 152 // Metrics methods. Subclasses should override if they wish to provide
153 // alternate methods. 153 // alternate methods.
154 virtual void RecordDataReductionInit(); 154 virtual void RecordDataReductionInit();
155 155
156 virtual void AddDefaultProxyBypassRules(); 156 virtual void AddDefaultProxyBypassRules();
157 157
158 // Writes a warning to the log that is used in backend processing of 158 // Writes a warning to the log that is used in backend processing of
159 // customer feedback. Virtual so tests can mock it for verification. 159 // customer feedback. Virtual so tests can mock it for verification.
160 virtual void LogProxyState(bool enabled, bool at_startup); 160 virtual void LogProxyState(bool enabled, bool at_startup);
161 161
162 bool HasTurnedOn() { return has_turned_on_; }
163 bool HasTurnedOff() { return has_turned_off_; }
164 // Note that these flags may only be toggled to true, never back to false.
165 void SetHasTurnedOn() { has_turned_on_ = true; }
166 void SetHasTurnedOff() { has_turned_off_ = true; }
167
168 // Accessor for unit tests. 162 // Accessor for unit tests.
169 std::vector<std::string> BypassRules() { return bypass_rules_;} 163 std::vector<std::string> BypassRules() { return bypass_rules_;}
170 164
171 private: 165 private:
172 friend class DataReductionProxySettingsTestBase; 166 friend class DataReductionProxySettingsTestBase;
173 friend class DataReductionProxySettingsTest; 167 friend class DataReductionProxySettingsTest;
174 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest, 168 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
175 TestAuthenticationInit); 169 TestAuthenticationInit);
176 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest, 170 FRIEND_TEST_ALL_PREFIXES(DataReductionProxySettingsTest,
177 TestAuthHashGeneration); 171 TestAuthHashGeneration);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 static base::string16 AuthHashForSalt(int64 salt); 217 static base::string16 AuthHashForSalt(int64 salt);
224 218
225 std::vector<std::string> bypass_rules_; 219 std::vector<std::string> bypass_rules_;
226 220
227 // Indicate whether a user has turned on the data reduction proxy previously 221 // Indicate whether a user has turned on the data reduction proxy previously
228 // in this session. 222 // in this session.
229 bool has_turned_on_; 223 bool has_turned_on_;
230 224
231 // Indicate whether a user has turned off the data reduction proxy previously 225 // Indicate whether a user has turned off the data reduction proxy previously
232 // in this session. 226 // in this session.
233 bool has_turned_off_; 227 bool has_turned_off_;
mmenke 2013/11/06 19:48:34 Get rid of these, too.
bengr 2013/11/06 21:15:24 Done.
234 228
235 bool disabled_by_carrier_; 229 bool disabled_by_carrier_;
236 bool enabled_by_user_; 230 bool enabled_by_user_;
237 231
238 scoped_ptr<net::URLFetcher> fetcher_; 232 scoped_ptr<net::URLFetcher> fetcher_;
239 BooleanPrefMember spdy_proxy_auth_enabled_; 233 BooleanPrefMember spdy_proxy_auth_enabled_;
240 234
241 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings); 235 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings);
242 }; 236 };
243 237
244 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ 238 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698