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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_params.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 "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 19 matching lines...) Expand all
30 namespace data_reduction_proxy { 30 namespace data_reduction_proxy {
31 31
32 // static 32 // static
33 bool DataReductionProxyParams::IsIncludedInFieldTrial() { 33 bool DataReductionProxyParams::IsIncludedInFieldTrial() {
34 return base::FieldTrialList::FindFullName( 34 return base::FieldTrialList::FindFullName(
35 "DataCompressionProxyRollout") == kEnabled; 35 "DataCompressionProxyRollout") == kEnabled;
36 } 36 }
37 37
38 // static 38 // static
39 bool DataReductionProxyParams::IsIncludedInAlternativeFieldTrial() { 39 bool DataReductionProxyParams::IsIncludedInAlternativeFieldTrial() {
40 return base::FieldTrialList::FindFullName( 40 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
41 "DataCompressionProxyAlternativeConfiguration") == kEnabled; 41 return (command_line.HasSwitch(
42 data_reduction_proxy::switches::kEnableDataReductionProxyAlt) ||
43 base::FieldTrialList::FindFullName(
44 "DataCompressionProxyAlternativeConfiguration") == kEnabled);
Alexei Svitkine (slow) 2014/09/17 20:15:07 Use the pattern recommended by go/finch-and-flags
bengr 2014/09/18 17:39:46 Done.
42 } 45 }
43 46
44 // static 47 // static
45 bool DataReductionProxyParams::IsIncludedInPromoFieldTrial() { 48 bool DataReductionProxyParams::IsIncludedInPromoFieldTrial() {
46 return FieldTrialList::FindFullName( 49 return FieldTrialList::FindFullName(
47 "DataCompressionProxyPromoVisibility") == kEnabled; 50 "DataCompressionProxyPromoVisibility") == kEnabled;
48 } 51 }
49 52
50 // static 53 // static
51 bool DataReductionProxyParams::IsIncludedInPreconnectHintingFieldTrial() { 54 bool DataReductionProxyParams::IsIncludedInPreconnectHintingFieldTrial() {
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 } 543 }
541 544
542 std::string DataReductionProxyParams::GetDefaultWarmupURL() const { 545 std::string DataReductionProxyParams::GetDefaultWarmupURL() const {
543 #if defined(DATA_REDUCTION_PROXY_WARMUP_URL) 546 #if defined(DATA_REDUCTION_PROXY_WARMUP_URL)
544 return DATA_REDUCTION_PROXY_WARMUP_URL; 547 return DATA_REDUCTION_PROXY_WARMUP_URL;
545 #endif 548 #endif
546 return std::string(); 549 return std::string();
547 } 550 }
548 551
549 } // namespace data_reduction_proxy 552 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698