OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
6 #define NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Called from IO thread. | 132 // Called from IO thread. |
133 int GetProxyConfig(ProxyConfig* config); | 133 int GetProxyConfig(ProxyConfig* config); |
134 | 134 |
135 // Posts a call to OnDestroy() to the UI thread. Called from | 135 // Posts a call to OnDestroy() to the UI thread. Called from |
136 // ProxyConfigServiceLinux's destructor. | 136 // ProxyConfigServiceLinux's destructor. |
137 void PostDestroyTask(); | 137 void PostDestroyTask(); |
138 // Safely stops gconf notifications. Posted to the UI thread. | 138 // Safely stops gconf notifications. Posted to the UI thread. |
139 void OnDestroy(); | 139 void OnDestroy(); |
140 | 140 |
141 private: | 141 private: |
| 142 friend class base::RefCountedThreadSafe<Delegate>; |
| 143 |
| 144 ~Delegate() {} |
| 145 |
142 // Obtains an environment variable's value. Parses a proxy server | 146 // Obtains an environment variable's value. Parses a proxy server |
143 // specification from it and puts it in result. Returns true if the | 147 // specification from it and puts it in result. Returns true if the |
144 // requested variable is defined and the value valid. | 148 // requested variable is defined and the value valid. |
145 bool GetProxyFromEnvVarForScheme(const char* variable, | 149 bool GetProxyFromEnvVarForScheme(const char* variable, |
146 ProxyServer::Scheme scheme, | 150 ProxyServer::Scheme scheme, |
147 ProxyServer* result_server); | 151 ProxyServer* result_server); |
148 // As above but with scheme set to HTTP, for convenience. | 152 // As above but with scheme set to HTTP, for convenience. |
149 bool GetProxyFromEnvVar(const char* variable, ProxyServer* result_server); | 153 bool GetProxyFromEnvVar(const char* variable, ProxyServer* result_server); |
150 // Fills proxy config from environment variables. Returns true if | 154 // Fills proxy config from environment variables. Returns true if |
151 // variables were found and the configuration is valid. | 155 // variables were found and the configuration is valid. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 230 |
227 private: | 231 private: |
228 scoped_refptr<Delegate> delegate_; | 232 scoped_refptr<Delegate> delegate_; |
229 | 233 |
230 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); | 234 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); |
231 }; | 235 }; |
232 | 236 |
233 } // namespace net | 237 } // namespace net |
234 | 238 |
235 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 239 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
OLD | NEW |