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

Unified Diff: chrome/browser/net/nss_context.cc

Issue 1121213002: [chrome/browser/net] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Review Comments 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 | « no previous file | chrome/browser/net/quota_policy_channel_id_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/nss_context.cc
diff --git a/chrome/browser/net/nss_context.cc b/chrome/browser/net/nss_context.cc
index 4e480677a2a757fc52cbea27d037d1a933f13c17..8865e1498ea8a01d49b55dde12248a59f0532633 100644
--- a/chrome/browser/net/nss_context.cc
+++ b/chrome/browser/net/nss_context.cc
@@ -4,7 +4,9 @@
#include "chrome/browser/net/nss_context.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/sequenced_task_runner.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/resource_context.h"
@@ -15,18 +17,18 @@ namespace {
// Relays callback to the right message loop.
void DidGetCertDBOnIOThread(
- scoped_refptr<base::MessageLoopProxy> response_message_loop,
+ const scoped_refptr<base::SequencedTaskRunner>& response_task_runner,
const base::Callback<void(net::NSSCertDatabase*)>& callback,
net::NSSCertDatabase* cert_db) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- response_message_loop->PostTask(FROM_HERE, base::Bind(callback, cert_db));
+ response_task_runner->PostTask(FROM_HERE, base::Bind(callback, cert_db));
}
// Gets NSSCertDatabase for the resource context.
void GetCertDBOnIOThread(
content::ResourceContext* context,
- scoped_refptr<base::MessageLoopProxy> response_message_loop,
+ const scoped_refptr<base::SequencedTaskRunner>& response_task_runner,
const base::Callback<void(net::NSSCertDatabase*)>& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -34,10 +36,10 @@ void GetCertDBOnIOThread(
// been initialized.
net::NSSCertDatabase* cert_db = GetNSSCertDatabaseForResourceContext(
context,
- base::Bind(&DidGetCertDBOnIOThread, response_message_loop, callback));
+ base::Bind(&DidGetCertDBOnIOThread, response_task_runner, callback));
if (cert_db)
- DidGetCertDBOnIOThread(response_message_loop, callback, cert_db);
+ DidGetCertDBOnIOThread(response_task_runner, callback, cert_db);
}
} // namespace
@@ -51,7 +53,7 @@ void GetNSSCertDatabaseForProfile(
FROM_HERE,
base::Bind(&GetCertDBOnIOThread,
profile->GetResourceContext(),
- base::MessageLoopProxy::current(),
+ base::ThreadTaskRunnerHandle::Get(),
callback));
}
« no previous file with comments | « no previous file | chrome/browser/net/quota_policy_channel_id_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698