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

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

Issue 388663002: Added data reduction proxy holdback experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 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_settings_factory_and roid.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings_factory_and roid.h"
6 #include "base/memory/singleton.h" 6 #include "base/memory/singleton.h"
7 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h" 7 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings. h" 9 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings. h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 KeyedService* DataReductionProxySettingsFactoryAndroid::BuildServiceInstanceFor( 46 KeyedService* DataReductionProxySettingsFactoryAndroid::BuildServiceInstanceFor(
47 content::BrowserContext* context) const { 47 content::BrowserContext* context) const {
48 Profile* profile = static_cast<Profile*>(context); 48 Profile* profile = static_cast<Profile*>(context);
49 int flags = DataReductionProxyParams::kFallbackAllowed; 49 int flags = DataReductionProxyParams::kFallbackAllowed;
50 if (DataReductionProxyParams::IsIncludedInFieldTrial()) 50 if (DataReductionProxyParams::IsIncludedInFieldTrial())
51 flags |= DataReductionProxyParams::kAllowed; 51 flags |= DataReductionProxyParams::kAllowed;
52 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) 52 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial())
53 flags |= DataReductionProxyParams::kAlternativeAllowed; 53 flags |= DataReductionProxyParams::kAlternativeAllowed;
54 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) 54 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial())
55 flags |= DataReductionProxyParams::kPromoAllowed; 55 flags |= DataReductionProxyParams::kPromoAllowed;
56 if (DataReductionProxyParams::IsIncludedInHoldbackFieldTrial())
57 flags |= DataReductionProxyParams::kHoldback;
56 58
57 DataReductionProxySettingsAndroid* settings = 59 DataReductionProxySettingsAndroid* settings =
58 new DataReductionProxySettingsAndroid( 60 new DataReductionProxySettingsAndroid(
59 new DataReductionProxyParams(flags)); 61 new DataReductionProxyParams(flags));
60 settings->InitDataReductionProxySettings(profile); 62 settings->InitDataReductionProxySettings(profile);
61 return settings; 63 return settings;
62 } 64 }
63 65
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698