OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/prefs/proxy_prefs.h" | 5 #include "chrome/browser/prefs/proxy_prefs.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 | 9 |
10 namespace ProxyPrefs { | 10 namespace ProxyPrefs { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // static | 45 // static |
46 bool StringToProxyMode(const std::string& in_value, ProxyMode* out_value) { | 46 bool StringToProxyMode(const std::string& in_value, ProxyMode* out_value) { |
47 DCHECK(out_value); | 47 DCHECK(out_value); |
48 for (int i = 0; i < kModeCount; i++) { | 48 for (int i = 0; i < kModeCount; i++) { |
49 if (in_value == kProxyModeNames[i]) | 49 if (in_value == kProxyModeNames[i]) |
50 return IntToProxyMode(i, out_value); | 50 return IntToProxyMode(i, out_value); |
51 } | 51 } |
52 return false; | 52 return false; |
53 } | 53 } |
54 | 54 |
55 const char* GetProxyModeName(ProxyMode mode) { | 55 const char* ProxyModeToString(ProxyMode mode) { |
56 return kProxyModeNames[mode]; | 56 return kProxyModeNames[mode]; |
57 } | 57 } |
58 | 58 |
59 } // namespace | 59 } // namespace |
OLD | NEW |