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

Unified Diff: net/cookies/cookie_monster.cc

Issue 1124153005: Adding ThreadTaskRunnerHandle in lieu of MessageLoopProxy in net/cert and net/cookies module (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « net/cert/nss_cert_database_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.cc
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index 66d3e457a503f70383d0ebf3dcf40705898e22c2..1bc09a6d16025c6ed7227b7e4b7237fab986caba 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -54,12 +54,13 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/profiler/scoped_tracker.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_util.h"
@@ -393,7 +394,7 @@ class CookieMonster::CookieMonsterTask
friend class base::RefCountedThreadSafe<CookieMonsterTask>;
CookieMonster* cookie_monster_;
- scoped_refptr<base::MessageLoopProxy> thread_;
+ scoped_refptr<base::SingleThreadTaskRunner> thread_;
DISALLOW_COPY_AND_ASSIGN(CookieMonsterTask);
};
@@ -401,7 +402,7 @@ class CookieMonster::CookieMonsterTask
CookieMonster::CookieMonsterTask::CookieMonsterTask(
CookieMonster* cookie_monster)
: cookie_monster_(cookie_monster),
- thread_(base::MessageLoopProxy::current()) {
+ thread_(base::ThreadTaskRunnerHandle::Get()) {
}
CookieMonster::CookieMonsterTask::~CookieMonsterTask() {
@@ -2428,7 +2429,7 @@ CookieMonster::AddCallbackForCookie(const GURL& gurl,
if (hook_map_.count(key) == 0)
hook_map_[key] = make_linked_ptr(new CookieChangedCallbackList());
return hook_map_[key]->Add(
- base::Bind(&RunAsync, base::MessageLoopProxy::current(), callback));
+ base::Bind(&RunAsync, base::ThreadTaskRunnerHandle::Get(), callback));
}
#if defined(OS_ANDROID)
« no previous file with comments | « net/cert/nss_cert_database_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698