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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 explicit ProxyConfigDictionary(const base::DictionaryValue* dict); | 30 explicit ProxyConfigDictionary(const base::DictionaryValue* dict); |
31 ~ProxyConfigDictionary(); | 31 ~ProxyConfigDictionary(); |
32 | 32 |
33 bool GetMode(ProxyPrefs::ProxyMode* out) const; | 33 bool GetMode(ProxyPrefs::ProxyMode* out) const; |
34 bool GetPacUrl(std::string* out) const; | 34 bool GetPacUrl(std::string* out) const; |
35 bool GetPacMandatory(bool* out) const; | 35 bool GetPacMandatory(bool* out) const; |
36 bool GetProxyServer(std::string* out) const; | 36 bool GetProxyServer(std::string* out) const; |
37 bool GetBypassList(std::string* out) const; | 37 bool GetBypassList(std::string* out) const; |
38 bool HasBypassList() const; | 38 bool HasBypassList() const; |
39 | 39 |
| 40 const base::DictionaryValue& GetDictionary() const; |
| 41 |
40 static base::DictionaryValue* CreateDirect(); | 42 static base::DictionaryValue* CreateDirect(); |
41 static base::DictionaryValue* CreateAutoDetect(); | 43 static base::DictionaryValue* CreateAutoDetect(); |
42 static base::DictionaryValue* CreatePacScript(const std::string& pac_url, | 44 static base::DictionaryValue* CreatePacScript(const std::string& pac_url, |
43 bool pac_mandatory); | 45 bool pac_mandatory); |
44 static base::DictionaryValue* CreateFixedServers( | 46 static base::DictionaryValue* CreateFixedServers( |
45 const std::string& proxy_server, | 47 const std::string& proxy_server, |
46 const std::string& bypass_list); | 48 const std::string& bypass_list); |
47 static base::DictionaryValue* CreateSystem(); | 49 static base::DictionaryValue* CreateSystem(); |
48 private: | 50 private: |
49 static base::DictionaryValue* CreateDictionary( | 51 static base::DictionaryValue* CreateDictionary( |
50 ProxyPrefs::ProxyMode mode, | 52 ProxyPrefs::ProxyMode mode, |
51 const std::string& pac_url, | 53 const std::string& pac_url, |
52 bool pac_mandatory, | 54 bool pac_mandatory, |
53 const std::string& proxy_server, | 55 const std::string& proxy_server, |
54 const std::string& bypass_list); | 56 const std::string& bypass_list); |
55 | 57 |
56 scoped_ptr<base::DictionaryValue> dict_; | 58 scoped_ptr<base::DictionaryValue> dict_; |
57 | 59 |
58 DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary); | 60 DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary); |
59 }; | 61 }; |
60 | 62 |
61 #endif // CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ | 63 #endif // CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_ |
OLD | NEW |