- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / net / chrome_network_data_saving_metrics.h
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DATA_SAVING_METRICS_H_
6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DATA_SAVING_METRICS_H_
7
8 #include "base/time/time.h"
9
10 class PrefService;
11
12 namespace chrome_browser_net {
13
14 #if defined(OS_ANDROID) || defined(OS_IOS)
15 // This is only exposed for testing. It is normally called by
16 // UpdateContentLengthPrefs.
17 void UpdateContentLengthPrefsForDataReductionProxy(
18     int received_content_length, int original_content_length,
19     bool with_data_reduction_proxy_enabled, bool via_data_reduction_proxy,
20     base::Time now, PrefService* prefs);
21 #endif
22
23 // Records daily data savings statistics to prefs and reports data savings UMA.
24 void UpdateContentLengthPrefs(
25     int received_content_length,
26     int original_content_length,
27     bool with_data_reduction_proxy_enabled,
28     bool via_data_reduction_proxy,
29     PrefService* prefs);
30
31 }  // namespace chrome_browser_net
32
33 #endif  // CHROME_BROWSER_NET_CHROME_NETWORK_DATA_SAVING_METRICS_H_