| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_config_dictionary.h" | 5 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 return CreateDictionary(ProxyPrefs::MODE_SYSTEM, "", "", ""); | 80 return CreateDictionary(ProxyPrefs::MODE_SYSTEM, "", "", ""); |
| 81 } | 81 } |
| 82 | 82 |
| 83 // static | 83 // static |
| 84 DictionaryValue* ProxyConfigDictionary::CreateDictionary( | 84 DictionaryValue* ProxyConfigDictionary::CreateDictionary( |
| 85 ProxyPrefs::ProxyMode mode, | 85 ProxyPrefs::ProxyMode mode, |
| 86 const std::string& pac_url, | 86 const std::string& pac_url, |
| 87 const std::string& proxy_server, | 87 const std::string& proxy_server, |
| 88 const std::string& bypass_list) { | 88 const std::string& bypass_list) { |
| 89 DictionaryValue* dict = new DictionaryValue(); | 89 DictionaryValue* dict = new DictionaryValue(); |
| 90 dict->SetString(kProxyMode, GetProxyModeName(mode)); | 90 dict->SetString(kProxyMode, ProxyModeToString(mode)); |
| 91 if (!pac_url.empty()) | 91 if (!pac_url.empty()) |
| 92 dict->SetString(kProxyPacUrl, pac_url); | 92 dict->SetString(kProxyPacUrl, pac_url); |
| 93 if (!proxy_server.empty()) | 93 if (!proxy_server.empty()) |
| 94 dict->SetString(kProxyServer, proxy_server); | 94 dict->SetString(kProxyServer, proxy_server); |
| 95 if (!bypass_list.empty()) | 95 if (!bypass_list.empty()) |
| 96 dict->SetString(kProxyBypassList, bypass_list); | 96 dict->SetString(kProxyBypassList, bypass_list); |
| 97 return dict; | 97 return dict; |
| 98 } | 98 } |
| OLD | NEW |