OLD | NEW |
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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/prefs/pref_member.h" | 16 #include "base/prefs/pref_member.h" |
17 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
20 class PrefService; | 20 class PrefService; |
21 | 21 |
22 namespace data_reduction_proxy { | 22 namespace data_reduction_proxy { |
23 | 23 |
24 class DataReductionProxyConfig; | 24 class DataReductionProxyConfig; |
25 class DataReductionProxyEventStore; | 25 class DataReductionProxyEventStore; |
26 class DataReductionProxyIOData; | 26 class DataReductionProxyIOData; |
27 class DataReductionProxyService; | 27 class DataReductionProxyService; |
28 class DataReductionProxyStatisticsPrefs; | 28 class DataReductionProxyCompressionStats; |
29 | 29 |
30 // The number of days of bandwidth usage statistics that are tracked. | 30 // The number of days of bandwidth usage statistics that are tracked. |
31 const unsigned int kNumDaysInHistory = 60; | 31 const unsigned int kNumDaysInHistory = 60; |
32 | 32 |
33 // The header used to request a data reduction proxy pass through. When a | 33 // The header used to request a data reduction proxy pass through. When a |
34 // request is sent to the data reduction proxy with this header, it will respond | 34 // request is sent to the data reduction proxy with this header, it will respond |
35 // with the original uncompressed response. | 35 // with the original uncompressed response. |
36 extern const char kDataReductionPassThroughHeader[]; | 36 extern const char kDataReductionPassThroughHeader[]; |
37 | 37 |
38 // The number of days of bandwidth usage statistics that are presented. | 38 // The number of days of bandwidth usage statistics that are presented. |
(...skipping 28 matching lines...) Expand all Loading... |
67 virtual ~DataReductionProxySettings(); | 67 virtual ~DataReductionProxySettings(); |
68 | 68 |
69 // Initializes the data reduction proxy with profile prefs and a | 69 // Initializes the data reduction proxy with profile prefs and a |
70 // |DataReductionProxyIOData|. The caller must ensure that all parameters | 70 // |DataReductionProxyIOData|. The caller must ensure that all parameters |
71 // remain alive for the lifetime of the |DataReductionProxySettings| instance. | 71 // remain alive for the lifetime of the |DataReductionProxySettings| instance. |
72 void InitDataReductionProxySettings( | 72 void InitDataReductionProxySettings( |
73 PrefService* prefs, | 73 PrefService* prefs, |
74 DataReductionProxyIOData* io_data, | 74 DataReductionProxyIOData* io_data, |
75 scoped_ptr<DataReductionProxyService> data_reduction_proxy_service); | 75 scoped_ptr<DataReductionProxyService> data_reduction_proxy_service); |
76 | 76 |
77 base::WeakPtr<DataReductionProxyStatisticsPrefs> statistics_prefs(); | 77 base::WeakPtr<DataReductionProxyCompressionStats> compression_stats(); |
78 | 78 |
79 // Sets the |register_synthetic_field_trial_| callback and runs to register | 79 // Sets the |register_synthetic_field_trial_| callback and runs to register |
80 // the DataReductionProxyEnabled and the DataReductionProxyLoFiEnabled | 80 // the DataReductionProxyEnabled and the DataReductionProxyLoFiEnabled |
81 // synthetic field trial. | 81 // synthetic field trial. |
82 void SetCallbackToRegisterSyntheticFieldTrial( | 82 void SetCallbackToRegisterSyntheticFieldTrial( |
83 const SyntheticFieldTrialRegistrationCallback& | 83 const SyntheticFieldTrialRegistrationCallback& |
84 on_data_reduction_proxy_enabled); | 84 on_data_reduction_proxy_enabled); |
85 | 85 |
86 // Returns true if the proxy is enabled. | 86 // Returns true if the proxy is enabled. |
87 bool IsDataReductionProxyEnabled() const; | 87 bool IsDataReductionProxyEnabled() const; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 SyntheticFieldTrialRegistrationCallback register_synthetic_field_trial_; | 266 SyntheticFieldTrialRegistrationCallback register_synthetic_field_trial_; |
267 | 267 |
268 base::ThreadChecker thread_checker_; | 268 base::ThreadChecker thread_checker_; |
269 | 269 |
270 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings); | 270 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings); |
271 }; | 271 }; |
272 | 272 |
273 } // namespace data_reduction_proxy | 273 } // namespace data_reduction_proxy |
274 | 274 |
275 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_SET
TINGS_H_ | 275 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_SET
TINGS_H_ |
OLD | NEW |