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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h

Issue 1546143002: Switch to standard integer types in components/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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_CORE_BROWSER_DATA_REDUCTION_PROXY_SETTIN GS_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_SETTIN GS_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_SETTIN GS_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_SETTIN GS_H_
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/basictypes.h"
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
16 #include "base/prefs/pref_member.h" 18 #include "base/prefs/pref_member.h"
17 #include "base/threading/thread_checker.h" 19 #include "base/threading/thread_checker.h"
18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr ics.h" 20 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr ics.h"
19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice_observer.h" 21 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice_observer.h"
20 #include "url/gurl.h" 22 #include "url/gurl.h"
21 23
22 class PrefService; 24 class PrefService;
23 25
24 namespace data_reduction_proxy { 26 namespace data_reduction_proxy {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // snackbar. If the user requests the page with images a certain number of 138 // snackbar. If the user requests the page with images a certain number of
137 // times, then Lo-Fi is disabled for the remainder of the session. 139 // times, then Lo-Fi is disabled for the remainder of the session.
138 void IncrementLoFiUserRequestsForImages(); 140 void IncrementLoFiUserRequestsForImages();
139 141
140 // Records UMA for Lo-Fi implicit opt out actions. 142 // Records UMA for Lo-Fi implicit opt out actions.
141 void RecordLoFiImplicitOptOutAction( 143 void RecordLoFiImplicitOptOutAction(
142 data_reduction_proxy::LoFiImplicitOptOutAction action) const; 144 data_reduction_proxy::LoFiImplicitOptOutAction action) const;
143 145
144 // Returns the time in microseconds that the last update was made to the 146 // Returns the time in microseconds that the last update was made to the
145 // daily original and received content lengths. 147 // daily original and received content lengths.
146 int64 GetDataReductionLastUpdateTime(); 148 int64_t GetDataReductionLastUpdateTime();
147 149
148 // Returns aggregate received and original content lengths over the specified 150 // Returns aggregate received and original content lengths over the specified
149 // number of days, as well as the time these stats were last updated. 151 // number of days, as well as the time these stats were last updated.
150 void GetContentLengths(unsigned int days, 152 void GetContentLengths(unsigned int days,
151 int64* original_content_length, 153 int64_t* original_content_length,
152 int64* received_content_length, 154 int64_t* received_content_length,
153 int64* last_update_time); 155 int64_t* last_update_time);
154 156
155 // Records that the data reduction proxy is unreachable or not. 157 // Records that the data reduction proxy is unreachable or not.
156 void SetUnreachable(bool unreachable); 158 void SetUnreachable(bool unreachable);
157 159
158 // Returns whether the data reduction proxy is unreachable. Returns true 160 // Returns whether the data reduction proxy is unreachable. Returns true
159 // if no request has successfully completed through proxy, even though atleast 161 // if no request has successfully completed through proxy, even though atleast
160 // some of them should have. 162 // some of them should have.
161 bool IsDataReductionProxyUnreachable(); 163 bool IsDataReductionProxyUnreachable();
162 164
163 ContentLengthList GetDailyContentLengths(const char* pref_name); 165 ContentLengthList GetDailyContentLengths(const char* pref_name);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 SyntheticFieldTrialRegistrationCallback register_synthetic_field_trial_; 326 SyntheticFieldTrialRegistrationCallback register_synthetic_field_trial_;
325 327
326 base::ThreadChecker thread_checker_; 328 base::ThreadChecker thread_checker_;
327 329
328 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings); 330 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings);
329 }; 331 };
330 332
331 } // namespace data_reduction_proxy 333 } // namespace data_reduction_proxy
332 334
333 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_SET TINGS_H_ 335 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_SET TINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698