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

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

Issue 578883004: Added flag to enable the data reduction proxy alternative (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = 0;
56 if (DataReductionProxyParams::IsIncludedInFieldTrial()) { 56 if (DataReductionProxyParams::IsIncludedInFieldTrial()) {
57 flags |= (DataReductionProxyParams::kAllowed | 57 flags |= (DataReductionProxyParams::kAllowed |
58 DataReductionProxyParams::kFallbackAllowed); 58 DataReductionProxyParams::kFallbackAllowed |
59 DataReductionProxyParams::kAlternativeAllowed);
59 } 60 }
60 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial())
61 flags |= DataReductionProxyParams::kAlternativeAllowed;
62 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) 61 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial())
63 flags |= DataReductionProxyParams::kPromoAllowed; 62 flags |= DataReductionProxyParams::kPromoAllowed;
64 if (DataReductionProxyParams::IsIncludedInHoldbackFieldTrial()) 63 if (DataReductionProxyParams::IsIncludedInHoldbackFieldTrial())
65 flags |= DataReductionProxyParams::kHoldback; 64 flags |= DataReductionProxyParams::kHoldback;
66 65
67 return new DataReductionProxyChromeSettings( 66 return new DataReductionProxyChromeSettings(
68 new DataReductionProxyParams(flags)); 67 new DataReductionProxyParams(flags));
69 } 68 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | components/data_reduction_proxy/browser/data_reduction_proxy_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698