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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc

Issue 473723002: Update data reduction proxy statistics prefs less often on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tooManyWritesPatch
Patch Set: Undo BUILD.gn and fix aw_browser_context Created 6 years, 3 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 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 void DataReductionProxyChromeSettings::InitDataReductionProxySettings( 32 void DataReductionProxyChromeSettings::InitDataReductionProxySettings(
33 data_reduction_proxy::DataReductionProxyConfigurator* configurator, 33 data_reduction_proxy::DataReductionProxyConfigurator* configurator,
34 PrefService* profile_prefs, 34 PrefService* profile_prefs,
35 PrefService* local_state_prefs, 35 PrefService* local_state_prefs,
36 net::URLRequestContextGetter* request_context) { 36 net::URLRequestContextGetter* request_context) {
37 SetProxyConfigurator(configurator); 37 SetProxyConfigurator(configurator);
38 DataReductionProxySettings::InitDataReductionProxySettings( 38 DataReductionProxySettings::InitDataReductionProxySettings(
39 profile_prefs, 39 profile_prefs,
40 local_state_prefs,
41 request_context); 40 request_context);
42 DataReductionProxySettings::SetOnDataReductionEnabledCallback( 41 DataReductionProxySettings::SetOnDataReductionEnabledCallback(
43 base::Bind(&DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial, 42 base::Bind(&DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial,
44 base::Unretained(this))); 43 base::Unretained(this)));
45 SetDataReductionProxyAlternativeEnabled( 44 SetDataReductionProxyAlternativeEnabled(
46 DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()); 45 DataReductionProxyParams::IsIncludedInAlternativeFieldTrial());
47 } 46 }
48 47
49 void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial( 48 void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial(
50 bool data_reduction_proxy_enabled) { 49 bool data_reduction_proxy_enabled) {
(...skipping 15 matching lines...) Expand all
66 // static 65 // static
67 std::string DataReductionProxyChromeSettings::GetClient() { 66 std::string DataReductionProxyChromeSettings::GetClient() {
68 #if defined(OS_ANDROID) 67 #if defined(OS_ANDROID)
69 return data_reduction_proxy::kClientChromeAndroid; 68 return data_reduction_proxy::kClientChromeAndroid;
70 #elif defined(OS_IOS) 69 #elif defined(OS_IOS)
71 return data_reduction_proxy::kClientChromeIOS; 70 return data_reduction_proxy::kClientChromeIOS;
72 #else 71 #else
73 return ""; 72 return "";
74 #endif 73 #endif
75 } 74 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698