OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 // sources are added by g_timeout_add and g_idle_add, and returned by | 259 // sources are added by g_timeout_add and g_idle_add, and returned by |
260 // g_main_context_default. gconf uses glib timeouts and idles and possibly | 260 // g_main_context_default. gconf uses glib timeouts and idles and possibly |
261 // other callbacks that will all be dispatched on this thread. Since gconf | 261 // other callbacks that will all be dispatched on this thread. Since gconf |
262 // is not thread safe, any use of gconf must be done on the thread running | 262 // is not thread safe, any use of gconf must be done on the thread running |
263 // this loop. | 263 // this loop. |
264 scoped_refptr<base::SingleThreadTaskRunner> glib_task_runner_; | 264 scoped_refptr<base::SingleThreadTaskRunner> glib_task_runner_; |
265 // Task runner for the IO thread. GetLatestProxyConfig() is called from | 265 // Task runner for the IO thread. GetLatestProxyConfig() is called from |
266 // the thread running this loop. | 266 // the thread running this loop. |
267 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 267 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
268 | 268 |
269 ObserverList<Observer> observers_; | 269 base::ObserverList<Observer> observers_; |
270 | 270 |
271 DISALLOW_COPY_AND_ASSIGN(Delegate); | 271 DISALLOW_COPY_AND_ASSIGN(Delegate); |
272 }; | 272 }; |
273 | 273 |
274 // Thin wrapper shell around Delegate. | 274 // Thin wrapper shell around Delegate. |
275 | 275 |
276 // Usual constructor | 276 // Usual constructor |
277 ProxyConfigServiceLinux(); | 277 ProxyConfigServiceLinux(); |
278 // For testing: take alternate setting and env var getter implementations. | 278 // For testing: take alternate setting and env var getter implementations. |
279 explicit ProxyConfigServiceLinux(base::Environment* env_var_getter); | 279 explicit ProxyConfigServiceLinux(base::Environment* env_var_getter); |
(...skipping 23 matching lines...) Expand all Loading... |
303 | 303 |
304 private: | 304 private: |
305 scoped_refptr<Delegate> delegate_; | 305 scoped_refptr<Delegate> delegate_; |
306 | 306 |
307 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); | 307 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); |
308 }; | 308 }; |
309 | 309 |
310 } // namespace net | 310 } // namespace net |
311 | 311 |
312 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 312 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
OLD | NEW |