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.
5 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DATA_SAVING_METRICS_H_
6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DATA_SAVING_METRICS_H_
8 #include "base/time/time.h"
12 namespace chrome_browser_net {
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);
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,
31 } // namespace chrome_browser_net
33 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DATA_SAVING_METRICS_H_