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 #ifndef CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ |
6 #define CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ | 6 #define CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 // See proxy_config_dictionary.cc for the structure of the respective strings. | 25 // See proxy_config_dictionary.cc for the structure of the respective strings. |
26 class ProxyConfigDictionary { | 26 class ProxyConfigDictionary { |
27 public: | 27 public: |
28 // Creates a deep copy of |dict| and leaves ownership to caller. | 28 // Creates a deep copy of |dict| and leaves ownership to caller. |
29 explicit ProxyConfigDictionary(const DictionaryValue* dict); | 29 explicit ProxyConfigDictionary(const DictionaryValue* dict); |
30 | 30 |
31 bool GetMode(ProxyPrefs::ProxyMode* out) const; | 31 bool GetMode(ProxyPrefs::ProxyMode* out) const; |
32 bool GetPacUrl(std::string* out) const; | 32 bool GetPacUrl(std::string* out) const; |
33 bool GetProxyServer(std::string* out) const; | 33 bool GetProxyServer(std::string* out) const; |
34 bool GetBypassList(std::string* out) const; | 34 bool GetBypassList(std::string* out) const; |
| 35 bool HasBypassList() const; |
35 | 36 |
36 static DictionaryValue* CreateDirect(); | 37 static DictionaryValue* CreateDirect(); |
37 static DictionaryValue* CreateAutoDetect(); | 38 static DictionaryValue* CreateAutoDetect(); |
38 static DictionaryValue* CreatePacScript(const std::string& pac_url); | 39 static DictionaryValue* CreatePacScript(const std::string& pac_url); |
39 static DictionaryValue* CreateFixedServers( | 40 static DictionaryValue* CreateFixedServers( |
40 const std::string& proxy_server, | 41 const std::string& proxy_server, |
41 const std::string& bypass_list); | 42 const std::string& bypass_list); |
42 static DictionaryValue* CreateSystem(); | 43 static DictionaryValue* CreateSystem(); |
43 private: | 44 private: |
44 static DictionaryValue* CreateDictionary(ProxyPrefs::ProxyMode mode, | 45 static DictionaryValue* CreateDictionary(ProxyPrefs::ProxyMode mode, |
45 const std::string& pac_url, | 46 const std::string& pac_url, |
46 const std::string& proxy_server, | 47 const std::string& proxy_server, |
47 const std::string& bypass_list); | 48 const std::string& bypass_list); |
48 | 49 |
49 scoped_ptr<DictionaryValue> dict_; | 50 scoped_ptr<DictionaryValue> dict_; |
50 | 51 |
51 DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary); | 52 DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary); |
52 }; | 53 }; |
53 | 54 |
54 #endif // CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ | 55 #endif // CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ |
OLD | NEW |