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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // GetLatestProxyConfig. Initially populated from the UI thread, but | 244 // GetLatestProxyConfig. Initially populated from the UI thread, but |
245 // afterwards only accessed from the IO thread. | 245 // afterwards only accessed from the IO thread. |
246 ProxyConfig cached_config_; | 246 ProxyConfig cached_config_; |
247 | 247 |
248 // A copy kept on the UI thread of the last seen proxy config, so as | 248 // A copy kept on the UI thread of the last seen proxy config, so as |
249 // to avoid posting a call to SetNewProxyConfig when we get a | 249 // to avoid posting a call to SetNewProxyConfig when we get a |
250 // notification but the config has not actually changed. | 250 // notification but the config has not actually changed. |
251 ProxyConfig reference_config_; | 251 ProxyConfig reference_config_; |
252 | 252 |
253 // The task runner for the glib thread, aka main browser thread. This thread | 253 // The task runner for the glib thread, aka main browser thread. This thread |
254 // is where we run the glib main loop (see | 254 // is where we run the glib main loop (see base/message_pump_glib.h). It is |
255 // base/message_loop/message_pump_glib.h). It is the glib default loop in | 255 // the glib default loop in the sense that it runs the glib default context: |
256 // the sense that it runs the glib default context: as in the context where | 256 // as in the context where sources are added by g_timeout_add and |
257 // sources are added by g_timeout_add and g_idle_add, and returned by | 257 // g_idle_add, and returned by g_main_context_default. gconf uses glib |
258 // g_main_context_default. gconf uses glib timeouts and idles and possibly | 258 // timeouts and idles and possibly other callbacks that will all be |
259 // other callbacks that will all be dispatched on this thread. Since gconf | 259 // dispatched on this thread. Since gconf is not thread safe, any use of |
260 // is not thread safe, any use of gconf must be done on the thread running | 260 // gconf must be done on the thread running this loop. |
261 // this loop. | |
262 scoped_refptr<base::SingleThreadTaskRunner> glib_thread_task_runner_; | 261 scoped_refptr<base::SingleThreadTaskRunner> glib_thread_task_runner_; |
263 // Task runner for the IO thread. GetLatestProxyConfig() is called from | 262 // Task runner for the IO thread. GetLatestProxyConfig() is called from |
264 // the thread running this loop. | 263 // the thread running this loop. |
265 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; | 264 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; |
266 | 265 |
267 ObserverList<Observer> observers_; | 266 ObserverList<Observer> observers_; |
268 | 267 |
269 DISALLOW_COPY_AND_ASSIGN(Delegate); | 268 DISALLOW_COPY_AND_ASSIGN(Delegate); |
270 }; | 269 }; |
271 | 270 |
(...skipping 28 matching lines...) Expand all Loading... |
300 | 299 |
301 private: | 300 private: |
302 scoped_refptr<Delegate> delegate_; | 301 scoped_refptr<Delegate> delegate_; |
303 | 302 |
304 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); | 303 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); |
305 }; | 304 }; |
306 | 305 |
307 } // namespace net | 306 } // namespace net |
308 | 307 |
309 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 308 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
OLD | NEW |