| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool ProxyConfigDictionary::GetBypassList(std::string* out) const { | 60 bool ProxyConfigDictionary::GetBypassList(std::string* out) const { |
| 61 return dict_->GetString(kProxyBypassList, out); | 61 return dict_->GetString(kProxyBypassList, out); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool ProxyConfigDictionary::HasBypassList() const { | 64 bool ProxyConfigDictionary::HasBypassList() const { |
| 65 return dict_->HasKey(kProxyBypassList); | 65 return dict_->HasKey(kProxyBypassList); |
| 66 } | 66 } |
| 67 | 67 |
| 68 const DictionaryValue& ProxyConfigDictionary::GetDictionary() const { |
| 69 return *dict_; |
| 70 } |
| 71 |
| 68 // static | 72 // static |
| 69 DictionaryValue* ProxyConfigDictionary::CreateDirect() { | 73 DictionaryValue* ProxyConfigDictionary::CreateDirect() { |
| 70 return CreateDictionary(ProxyPrefs::MODE_DIRECT, | 74 return CreateDictionary(ProxyPrefs::MODE_DIRECT, |
| 71 std::string(), | 75 std::string(), |
| 72 false, | 76 false, |
| 73 std::string(), | 77 std::string(), |
| 74 std::string()); | 78 std::string()); |
| 75 } | 79 } |
| 76 | 80 |
| 77 // static | 81 // static |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 if (!pac_url.empty()) { | 134 if (!pac_url.empty()) { |
| 131 dict->SetString(kProxyPacUrl, pac_url); | 135 dict->SetString(kProxyPacUrl, pac_url); |
| 132 dict->SetBoolean(kProxyPacMandatory, pac_mandatory); | 136 dict->SetBoolean(kProxyPacMandatory, pac_mandatory); |
| 133 } | 137 } |
| 134 if (!proxy_server.empty()) | 138 if (!proxy_server.empty()) |
| 135 dict->SetString(kProxyServer, proxy_server); | 139 dict->SetString(kProxyServer, proxy_server); |
| 136 if (!bypass_list.empty()) | 140 if (!bypass_list.empty()) |
| 137 dict->SetString(kProxyBypassList, bypass_list); | 141 dict->SetString(kProxyBypassList, bypass_list); |
| 138 return dict; | 142 return dict; |
| 139 } | 143 } |
| OLD | NEW |