OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | |
6 | |
7 #include "chrome/browser/browser_process.h" | |
8 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h" | |
9 #include "chrome/browser/profiles/profile.h" | |
10 #include "chrome/browser/profiles/profile_manager.h" | |
11 #include "components/data_reduction_proxy/browser/data_reduction_proxy_configura tor.h" | |
12 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" | |
13 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings. h" | |
14 | |
15 using data_reduction_proxy::DataReductionProxyParams; | |
16 using data_reduction_proxy::DataReductionProxySettings; | |
17 | |
18 DataReductionProxyChromeSettings::DataReductionProxyChromeSettings( | |
19 DataReductionProxyParams* params) : DataReductionProxySettings(params) { | |
20 } | |
21 | |
22 DataReductionProxyChromeSettings::~DataReductionProxyChromeSettings() { | |
23 } | |
24 | |
25 void DataReductionProxyChromeSettings::InitDataReductionProxySettings( | |
26 Profile* profile) { | |
27 DCHECK(profile); | |
28 PrefService* prefs = profile->GetPrefs(); | |
29 | |
30 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigurator> | |
31 configurator(new DataReductionProxyChromeConfigurator(prefs)); | |
32 SetProxyConfigurator(configurator.Pass()); | |
33 DataReductionProxySettings::InitDataReductionProxySettings( | |
34 prefs, | |
35 g_browser_process->local_state(), | |
willchan no longer on Chromium
2014/07/28 15:45:22
Can you pass this in rather than reaching into the
bengr
2014/07/28 20:29:03
Done.
| |
36 ProfileManager::GetActiveUserProfile()->GetRequestContext()); | |
willchan no longer on Chromium
2014/07/28 15:45:22
Isn't this the same as the profile that's passed i
bengr
2014/07/28 20:29:04
That's old cruft. Done.
| |
37 | |
38 SetDataReductionProxyAlternativeEnabled( | |
39 DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()); | |
40 } | |
OLD | NEW |