summaryrefslogtreecommitdiffstats
path: root/net/proxy
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 06:18:14 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 06:18:14 +0000
commitb5cfec56a2e0766e8326f6d25b17f549f7e4f667 (patch)
tree6ec22bd822395f815da6c7dfad04489811d7ef74 /net/proxy
parent95bfc94dfbff52e978f84cb3ce272cc0124d7968 (diff)
downloadchromium_src-b5cfec56a2e0766e8326f6d25b17f549f7e4f667.zip
chromium_src-b5cfec56a2e0766e8326f6d25b17f549f7e4f667.tar.gz
chromium_src-b5cfec56a2e0766e8326f6d25b17f549f7e4f667.tar.bz2
Convert more NewRunnable* to base::Bind().
Review URL: http://codereview.chromium.org/8742001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy')
-rw-r--r--net/proxy/proxy_config_service_linux_unittest.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/proxy/proxy_config_service_linux_unittest.cc b/net/proxy/proxy_config_service_linux_unittest.cc
index 6702110..37aeb57 100644
--- a/net/proxy/proxy_config_service_linux_unittest.cc
+++ b/net/proxy/proxy_config_service_linux_unittest.cc
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -269,8 +270,8 @@ class SynchConfigGetter {
io_thread_.StartWithOptions(options);
// Make sure the thread started.
- io_thread_.message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &SynchConfigGetter::Init));
+ io_thread_.message_loop()->PostTask(FROM_HERE,
+ base::Bind(&SynchConfigGetter::Init, base::Unretained(this)));
Wait();
}
@@ -279,8 +280,8 @@ class SynchConfigGetter {
// before cleaning up that thread.
delete config_service_;
// Clean up the IO thread.
- io_thread_.message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &SynchConfigGetter::Cleanup));
+ io_thread_.message_loop()->PostTask(FROM_HERE,
+ base::Bind(&SynchConfigGetter::CleanUp, base::Unretained(this)));
Wait();
}
@@ -298,8 +299,9 @@ class SynchConfigGetter {
// Synchronously gets the proxy config.
net::ProxyConfigService::ConfigAvailability SyncGetLatestProxyConfig(
net::ProxyConfig* config) {
- io_thread_.message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &SynchConfigGetter::GetLatestConfigOnIOThread));
+ io_thread_.message_loop()->PostTask(FROM_HERE,
+ base::Bind(&SynchConfigGetter::GetLatestConfigOnIOThread,
+ base::Unretained(this)));
Wait();
*config = proxy_config_;
return get_latest_config_result_;
@@ -320,7 +322,7 @@ class SynchConfigGetter {
}
// [Runs on |io_thread_|] Signals |event_| on cleanup completion.
- void Cleanup() {
+ void CleanUp() {
MessageLoop::current()->RunAllPending();
event_.Signal();
}