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

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

Issue 266033002: Collect data reduction proxy UMA on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Workaround for base::Time::Explode bug in Windows Created 6 years, 7 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_METRICS_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_METRICS_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_METRICS_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_METRICS_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 21 matching lines...) Expand all
32 const net::URLRequest* request); 32 const net::URLRequest* request);
33 33
34 // Returns |received_content_length| as adjusted original content length if 34 // Returns |received_content_length| as adjusted original content length if
35 // |original_content_length| has the invalid value (-1) or |request_type| 35 // |original_content_length| has the invalid value (-1) or |request_type|
36 // is not |VIA_DATA_REDUCTION_PROXY|. 36 // is not |VIA_DATA_REDUCTION_PROXY|.
37 int64 GetAdjustedOriginalContentLength( 37 int64 GetAdjustedOriginalContentLength(
38 DataReductionProxyRequestType request_type, 38 DataReductionProxyRequestType request_type,
39 int64 original_content_length, 39 int64 original_content_length,
40 int64 received_content_length); 40 int64 received_content_length);
41 41
42 #if defined(OS_ANDROID) || defined(OS_IOS)
43 // TODO(bengr): Remove platform-specific ifdefs.
44 // This is only exposed for testing. It is normally called by 42 // This is only exposed for testing. It is normally called by
45 // UpdateContentLengthPrefs. 43 // UpdateContentLengthPrefs.
46 void UpdateContentLengthPrefsForDataReductionProxy( 44 void UpdateContentLengthPrefsForDataReductionProxy(
47 int received_content_length, 45 int received_content_length,
48 int original_content_length, 46 int original_content_length,
49 bool with_data_reduction_proxy_enabled, 47 bool with_data_reduction_proxy_enabled,
50 DataReductionProxyRequestType request_type, 48 DataReductionProxyRequestType request_type,
51 base::Time now, PrefService* prefs); 49 base::Time now, PrefService* prefs);
52 #endif
53 50
54 // Records daily data savings statistics to prefs and reports data savings UMA. 51 // Records daily data savings statistics to prefs and reports data savings UMA.
55 void UpdateContentLengthPrefs( 52 void UpdateContentLengthPrefs(
56 int received_content_length, 53 int received_content_length,
57 int original_content_length, 54 int original_content_length,
58 bool with_data_reduction_proxy_enabled, 55 bool with_data_reduction_proxy_enabled,
59 DataReductionProxyRequestType request_type, 56 DataReductionProxyRequestType request_type,
60 PrefService* prefs); 57 PrefService* prefs);
61 58
62 } // namespace data_reduction_proxy 59 } // namespace data_reduction_proxy
63 60
64 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_METRICS_ H_ 61 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_METRICS_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698