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

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

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove incorrect DCHECK from drp_statistics_prefs.cc 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_fact ory.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 9 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
10 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" 10 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 "DataReductionProxyChromeSettings", 45 "DataReductionProxyChromeSettings",
46 BrowserContextDependencyManager::GetInstance()) { 46 BrowserContextDependencyManager::GetInstance()) {
47 } 47 }
48 48
49 DataReductionProxyChromeSettingsFactory:: 49 DataReductionProxyChromeSettingsFactory::
50 ~DataReductionProxyChromeSettingsFactory() { 50 ~DataReductionProxyChromeSettingsFactory() {
51 } 51 }
52 52
53 KeyedService* DataReductionProxyChromeSettingsFactory::BuildServiceInstanceFor( 53 KeyedService* DataReductionProxyChromeSettingsFactory::BuildServiceInstanceFor(
54 content::BrowserContext* context) const { 54 content::BrowserContext* context) const {
55 int flags = 0; 55 int flags = DataReductionProxyParams::kAllowed |
56 if (DataReductionProxyParams::IsIncludedInFieldTrial()) { 56 DataReductionProxyParams::kFallbackAllowed |
57 flags |= (DataReductionProxyParams::kAllowed | 57 DataReductionProxyParams::kAlternativeAllowed;
58 DataReductionProxyParams::kFallbackAllowed |
59 DataReductionProxyParams::kAlternativeAllowed);
60 }
61 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) 58 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial())
62 flags |= DataReductionProxyParams::kPromoAllowed; 59 flags |= DataReductionProxyParams::kPromoAllowed;
63 if (DataReductionProxyParams::IsIncludedInHoldbackFieldTrial()) 60 if (DataReductionProxyParams::IsIncludedInHoldbackFieldTrial())
64 flags |= DataReductionProxyParams::kHoldback; 61 flags |= DataReductionProxyParams::kHoldback;
65 62
66 return new DataReductionProxyChromeSettings( 63 return new DataReductionProxyChromeSettings(
67 new DataReductionProxyParams(flags)); 64 new DataReductionProxyParams(flags));
68 } 65 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/profiles/off_the_record_profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698