OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_NET_FIREFOX_PROXY_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_NET_FIREFOX_PROXY_SETTINGS_H_ |
6 #define CHROME_BROWSER_NET_FIREFOX_PROXY_SETTINGS_H_ | 6 #define CHROME_BROWSER_NET_FIREFOX_PROXY_SETTINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 int gopher_proxy_port() const { return gopher_proxy_port_; } | 61 int gopher_proxy_port() const { return gopher_proxy_port_; } |
62 | 62 |
63 std::string socks_host() const { return socks_host_; } | 63 std::string socks_host() const { return socks_host_; } |
64 int socks_port() const { return socks_port_; } | 64 int socks_port() const { return socks_port_; } |
65 SOCKSVersion socks_version() const { return socks_version_; } | 65 SOCKSVersion socks_version() const { return socks_version_; } |
66 | 66 |
67 std::vector<std::string> proxy_bypass_list() const { | 67 std::vector<std::string> proxy_bypass_list() const { |
68 return proxy_bypass_list_; | 68 return proxy_bypass_list_; |
69 } | 69 } |
70 | 70 |
71 const std::string autoconfig_url() const { | 71 const std::string& autoconfig_url() const { return autoconfig_url_; } |
72 return autoconfig_url_; | |
73 } | |
74 | 72 |
75 // Converts a FirefoxProxySettings object to a net::ProxyConfig. | 73 // Converts a FirefoxProxySettings object to a net::ProxyConfig. |
76 // On success returns true and fills |config| with the result. | 74 // On success returns true and fills |config| with the result. |
77 bool ToProxyConfig(net::ProxyConfig* config); | 75 bool ToProxyConfig(net::ProxyConfig* config); |
78 | 76 |
79 protected: | 77 protected: |
80 // Gets the settings from the passed prefs.js file and returns true if | 78 // Gets the settings from the passed prefs.js file and returns true if |
81 // successful. | 79 // successful. |
82 // Protected for tests. | 80 // Protected for tests. |
83 static bool GetSettingsFromFile(const base::FilePath& pref_file, | 81 static bool GetSettingsFromFile(const base::FilePath& pref_file, |
(...skipping 19 matching lines...) Expand all Loading... |
103 SOCKSVersion socks_version_; | 101 SOCKSVersion socks_version_; |
104 | 102 |
105 std::vector<std::string> proxy_bypass_list_; | 103 std::vector<std::string> proxy_bypass_list_; |
106 | 104 |
107 std::string autoconfig_url_; | 105 std::string autoconfig_url_; |
108 | 106 |
109 DISALLOW_COPY_AND_ASSIGN(FirefoxProxySettings); | 107 DISALLOW_COPY_AND_ASSIGN(FirefoxProxySettings); |
110 }; | 108 }; |
111 | 109 |
112 #endif // CHROME_BROWSER_NET_FIREFOX_PROXY_SETTINGS_H_ | 110 #endif // CHROME_BROWSER_NET_FIREFOX_PROXY_SETTINGS_H_ |
OLD | NEW |