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

Unified Diff: content/browser/quota/usage_tracker_unittest.cc

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 years, 6 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
Index: content/browser/quota/usage_tracker_unittest.cc
diff --git a/content/browser/quota/usage_tracker_unittest.cc b/content/browser/quota/usage_tracker_unittest.cc
index 786146ab7d57157da59b4eda8d2d1e6f5f285722..3cfdf2cb1031e4a0b4a85511197ffae81e57631f 100644
--- a/content/browser/quota/usage_tracker_unittest.cc
+++ b/content/browser/quota/usage_tracker_unittest.cc
@@ -3,7 +3,10 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/location.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "content/public/test/mock_special_storage_policy.h"
#include "net/base/net_util.h"
#include "storage/browser/quota/usage_tracker.h"
@@ -56,8 +59,8 @@ class MockQuotaClient : public QuotaClient {
const GetUsageCallback& callback) override {
EXPECT_EQ(kStorageTypeTemporary, type);
int64 usage = GetUsage(origin);
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, usage));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ base::Bind(callback, usage));
}
void GetOriginsForType(StorageType type,
@@ -68,8 +71,8 @@ class MockQuotaClient : public QuotaClient {
itr != usage_map_.end(); ++itr) {
origins.insert(itr->first);
}
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, origins));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, origins));
}
void GetOriginsForHost(StorageType type,
@@ -82,8 +85,8 @@ class MockQuotaClient : public QuotaClient {
if (net::GetHostOrSpecFromURL(itr->first) == host)
origins.insert(itr->first);
}
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, origins));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, origins));
}
void DeleteOriginData(const GURL& origin,
@@ -91,7 +94,7 @@ class MockQuotaClient : public QuotaClient {
const DeletionCallback& callback) override {
EXPECT_EQ(kStorageTypeTemporary, type);
usage_map_.erase(origin);
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(callback, kQuotaStatusOk));
}
« no previous file with comments | « content/browser/quota/storage_monitor_unittest.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698