Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: net/proxy/proxy_config_service_linux.h

Issue 10140010: Use base::MessageLoopProxy instead of MessageLoop in ProxyConfigServiceLinux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/proxy/proxy_config_service_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_linux.h
diff --git a/net/proxy/proxy_config_service_linux.h b/net/proxy/proxy_config_service_linux.h
index 94eef7e871d3765699bdf0dfac4982b46eafc055..8dbb3970dd882ffefcce6c505830359b4b11565a 100644
--- a/net/proxy/proxy_config_service_linux.h
+++ b/net/proxy/proxy_config_service_linux.h
@@ -14,13 +14,18 @@
#include "base/environment.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop.h"
#include "base/observer_list.h"
#include "net/base/net_export.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_config_service.h"
#include "net/proxy/proxy_server.h"
+class MessageLoopForIO;
+
+namespace base {
+class MessageLoopProxy;
+} // namespace base
+
namespace net {
// Implementation of ProxyConfigService that retrieves the system proxy
@@ -47,7 +52,7 @@ class NET_EXPORT_PRIVATE ProxyConfigServiceLinux : public ProxyConfigService {
// One of |glib_default_loop| and |file_loop| will be used for
// gconf/gsettings calls or reading necessary files, depending on the
// implementation.
- virtual bool Init(MessageLoop* glib_default_loop,
+ virtual bool Init(base::MessageLoopProxy* glib_default_loop,
MessageLoopForIO* file_loop) = 0;
// Releases the gconf/gsettings client, which clears cached directories and
@@ -61,7 +66,7 @@ class NET_EXPORT_PRIVATE ProxyConfigServiceLinux : public ProxyConfigService {
// Returns the message loop for the thread on which this object
// handles notifications, and also on which it must be destroyed.
// Returns NULL if it does not matter.
- virtual MessageLoop* GetNotificationLoop() = 0;
+ virtual base::MessageLoopProxy* GetNotificationLoop() = 0;
// Returns the data source's name (e.g. "gconf", "gsettings", "KDE",
// "test"). Used only for diagnostic purposes (e.g. VLOG(1) etc.).
@@ -177,8 +182,8 @@ class NET_EXPORT_PRIVATE ProxyConfigServiceLinux : public ProxyConfigService {
// thread is specified so that notifications can post tasks to it
// (and for assertions). The message loop for the file thread is
// used to read any files needed to determine proxy settings.
- void SetUpAndFetchInitialConfig(MessageLoop* glib_default_loop,
- MessageLoop* io_loop,
+ void SetUpAndFetchInitialConfig(base::MessageLoopProxy* glib_default_loop,
+ base::MessageLoopProxy* io_loop,
MessageLoopForIO* file_loop);
// Handler for setting change notifications: fetches a new proxy
@@ -255,10 +260,10 @@ class NET_EXPORT_PRIVATE ProxyConfigServiceLinux : public ProxyConfigService {
// timeouts and idles and possibly other callbacks that will all be
// dispatched on this thread. Since gconf is not thread safe, any use of
// gconf must be done on the thread running this loop.
- MessageLoop* glib_default_loop_;
+ scoped_refptr<base::MessageLoopProxy> glib_default_loop_;
// MessageLoop for the IO thread. GetLatestProxyConfig() is called from
// the thread running this loop.
- MessageLoop* io_loop_;
+ scoped_refptr<base::MessageLoopProxy> io_loop_;
ObserverList<Observer> observers_;
@@ -276,8 +281,8 @@ class NET_EXPORT_PRIVATE ProxyConfigServiceLinux : public ProxyConfigService {
virtual ~ProxyConfigServiceLinux();
- void SetupAndFetchInitialConfig(MessageLoop* glib_default_loop,
- MessageLoop* io_loop,
+ void SetupAndFetchInitialConfig(base::MessageLoopProxy* glib_default_loop,
+ base::MessageLoopProxy* io_loop,
MessageLoopForIO* file_loop) {
delegate_->SetUpAndFetchInitialConfig(glib_default_loop, io_loop,
file_loop);
« no previous file with comments | « no previous file | net/proxy/proxy_config_service_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698