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

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: Removed unneeded variables 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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void ProbeWhetherDataReductionProxyIsAvailable(); 211 void ProbeWhetherDataReductionProxyIsAvailable();
218 std::string GetProxyCheckURL(); 212 std::string GetProxyCheckURL();
219 213
220 // Returns a UTF16 string that's the hash of the configured authentication 214 // Returns a UTF16 string that's the hash of the configured authentication
221 // key and |salt|. Returns an empty UTF16 string if no key is configured or 215 // key and |salt|. Returns an empty UTF16 string if no key is configured or
222 // the data reduction proxy feature isn't available. 216 // the data reduction proxy feature isn't available.
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
228 // in this session.
229 bool has_turned_on_;
230
231 // Indicate whether a user has turned off the data reduction proxy previously
232 // in this session.
233 bool has_turned_off_;
234
235 bool disabled_by_carrier_; 221 bool disabled_by_carrier_;
236 bool enabled_by_user_; 222 bool enabled_by_user_;
237 223
238 scoped_ptr<net::URLFetcher> fetcher_; 224 scoped_ptr<net::URLFetcher> fetcher_;
239 BooleanPrefMember spdy_proxy_auth_enabled_; 225 BooleanPrefMember spdy_proxy_auth_enabled_;
240 226
241 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings); 227 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings);
242 }; 228 };
243 229
244 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ 230 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698