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/core/browser/data_reduction_proxy_sett
ings.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 bool rv = list_value.GetString(index, &pref_value); | 72 bool rv = list_value.GetString(index, &pref_value); |
73 DCHECK(rv); | 73 DCHECK(rv); |
74 if (rv) { | 74 if (rv) { |
75 rv = base::StringToInt64(pref_value, &val); | 75 rv = base::StringToInt64(pref_value, &val); |
76 DCHECK(rv); | 76 DCHECK(rv); |
77 } | 77 } |
78 return val; | 78 return val; |
79 } | 79 } |
80 | 80 |
81 bool IsEnabledOnCommandLine() { | 81 bool IsEnabledOnCommandLine() { |
82 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 82 const base::CommandLine& command_line = |
| 83 *base::CommandLine::ForCurrentProcess(); |
83 return command_line.HasSwitch( | 84 return command_line.HasSwitch( |
84 data_reduction_proxy::switches::kEnableDataReductionProxy); | 85 data_reduction_proxy::switches::kEnableDataReductionProxy); |
85 } | 86 } |
86 | 87 |
87 } // namespace | 88 } // namespace |
88 | 89 |
89 namespace data_reduction_proxy { | 90 namespace data_reduction_proxy { |
90 | 91 |
91 DataReductionProxySettings::DataReductionProxySettings( | 92 DataReductionProxySettings::DataReductionProxySettings( |
92 DataReductionProxyParams* params) | 93 DataReductionProxyParams* params) |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 SetProxyConfigs(enabled_by_user_, | 596 SetProxyConfigs(enabled_by_user_, |
596 IsDataReductionProxyAlternativeEnabled(), | 597 IsDataReductionProxyAlternativeEnabled(), |
597 restricted_by_carrier_, | 598 restricted_by_carrier_, |
598 false); | 599 false); |
599 } | 600 } |
600 disabled_on_vpn_ = false; | 601 disabled_on_vpn_ = false; |
601 return false; | 602 return false; |
602 } | 603 } |
603 | 604 |
604 } // namespace data_reduction_proxy | 605 } // namespace data_reduction_proxy |
OLD | NEW |