| OLD | NEW |
| 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 Loading... |
| 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 std::string group_name = base::FieldTrialList::FindFullName( |
| 41 "DataCompressionProxyAlternativeConfiguration") == kEnabled; | 41 "DataCompressionProxyAlternativeConfiguration"); |
| 42 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 43 data_reduction_proxy::switches::kEnableDataReductionProxyAlt)) { |
| 44 return true; |
| 45 } |
| 46 return group_name == kEnabled; |
| 42 } | 47 } |
| 43 | 48 |
| 44 // static | 49 // static |
| 45 bool DataReductionProxyParams::IsIncludedInPromoFieldTrial() { | 50 bool DataReductionProxyParams::IsIncludedInPromoFieldTrial() { |
| 46 return FieldTrialList::FindFullName( | 51 return FieldTrialList::FindFullName( |
| 47 "DataCompressionProxyPromoVisibility") == kEnabled; | 52 "DataCompressionProxyPromoVisibility") == kEnabled; |
| 48 } | 53 } |
| 49 | 54 |
| 50 // static | 55 // static |
| 51 bool DataReductionProxyParams::IsIncludedInPreconnectHintingFieldTrial() { | 56 bool DataReductionProxyParams::IsIncludedInPreconnectHintingFieldTrial() { |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 } | 545 } |
| 541 | 546 |
| 542 std::string DataReductionProxyParams::GetDefaultWarmupURL() const { | 547 std::string DataReductionProxyParams::GetDefaultWarmupURL() const { |
| 543 #if defined(DATA_REDUCTION_PROXY_WARMUP_URL) | 548 #if defined(DATA_REDUCTION_PROXY_WARMUP_URL) |
| 544 return DATA_REDUCTION_PROXY_WARMUP_URL; | 549 return DATA_REDUCTION_PROXY_WARMUP_URL; |
| 545 #endif | 550 #endif |
| 546 return std::string(); | 551 return std::string(); |
| 547 } | 552 } |
| 548 | 553 |
| 549 } // namespace data_reduction_proxy | 554 } // namespace data_reduction_proxy |
| OLD | NEW |