Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/prefs/proxy_config_dictionary.cc

Issue 6469030: Support bypassList in Proxy Settings API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 29 matching lines...) Expand all
40 } 40 }
41 41
42 bool ProxyConfigDictionary::GetProxyServer(std::string* out) const { 42 bool ProxyConfigDictionary::GetProxyServer(std::string* out) const {
43 return dict_->GetString(kProxyServer, out); 43 return dict_->GetString(kProxyServer, out);
44 } 44 }
45 45
46 bool ProxyConfigDictionary::GetBypassList(std::string* out) const { 46 bool ProxyConfigDictionary::GetBypassList(std::string* out) const {
47 return dict_->GetString(kProxyBypassList, out); 47 return dict_->GetString(kProxyBypassList, out);
48 } 48 }
49 49
50 bool ProxyConfigDictionary::HasBypassList() const {
51 return dict_->HasKey(kProxyBypassList);
52 }
53
50 // static 54 // static
51 DictionaryValue* ProxyConfigDictionary::CreateDirect() { 55 DictionaryValue* ProxyConfigDictionary::CreateDirect() {
52 return CreateDictionary(ProxyPrefs::MODE_DIRECT, "", "", ""); 56 return CreateDictionary(ProxyPrefs::MODE_DIRECT, "", "", "");
53 } 57 }
54 58
55 // static 59 // static
56 DictionaryValue* ProxyConfigDictionary::CreateAutoDetect() { 60 DictionaryValue* ProxyConfigDictionary::CreateAutoDetect() {
57 return CreateDictionary(ProxyPrefs::MODE_AUTO_DETECT, "", "", ""); 61 return CreateDictionary(ProxyPrefs::MODE_AUTO_DETECT, "", "", "");
58 } 62 }
59 63
(...skipping 29 matching lines...) Expand all
89 DictionaryValue* dict = new DictionaryValue(); 93 DictionaryValue* dict = new DictionaryValue();
90 dict->SetString(kProxyMode, ProxyModeToString(mode)); 94 dict->SetString(kProxyMode, ProxyModeToString(mode));
91 if (!pac_url.empty()) 95 if (!pac_url.empty())
92 dict->SetString(kProxyPacUrl, pac_url); 96 dict->SetString(kProxyPacUrl, pac_url);
93 if (!proxy_server.empty()) 97 if (!proxy_server.empty())
94 dict->SetString(kProxyServer, proxy_server); 98 dict->SetString(kProxyServer, proxy_server);
95 if (!bypass_list.empty()) 99 if (!bypass_list.empty())
96 dict->SetString(kProxyBypassList, bypass_list); 100 dict->SetString(kProxyBypassList, bypass_list);
97 return dict; 101 return dict;
98 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/proxy_config_dictionary.h ('k') | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698