Commit c6284dfe authored by pranay.kumar's avatar pranay.kumar Committed by Commit bot

Replace MessageLoopProxy usage with ThreadTaskRunnerHandle in chrome/browser/browsing_data module.

MessageLoopProxy is deprecated.
This basically does a search and replace of:

MessageLoopProxy::current() -> ThreadTaskRunnerHandle::Get().

MessageLoopProxy -> SingleThreadTaskRunner

BUG=391045

Review URL: https://codereview.chromium.org/1117583003

Cr-Commit-Position: refs/heads/master@{#327479}
parent c1be0427
......@@ -4,8 +4,8 @@
#include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
......@@ -18,7 +18,7 @@ class CannedBrowsingDataIndexedDBHelperTest : public testing::Test {
public:
void SetUp() override {
IndexedDBContext()->SetTaskRunnerForTesting(
base::MessageLoopProxy::current().get());
base::ThreadTaskRunnerHandle::Get().get());
}
content::IndexedDBContext* IndexedDBContext() {
......
......@@ -5,6 +5,7 @@
#include "chrome/browser/browsing_data/browsing_data_quota_helper.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
BrowsingDataQuotaHelper::QuotaInfo::QuotaInfo()
: temporary_usage(0),
......@@ -35,7 +36,7 @@ void BrowsingDataQuotaHelperDeleter::Destruct(
}
BrowsingDataQuotaHelper::BrowsingDataQuotaHelper(
base::MessageLoopProxy* io_thread)
base::SingleThreadTaskRunner* io_thread)
: io_thread_(io_thread) {
}
......
......@@ -10,10 +10,14 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/sequenced_task_runner_helpers.h"
#include "storage/common/quota/quota_types.h"
namespace base {
class SingleThreadTaskRunner;
} // namespace base
class BrowsingDataQuotaHelper;
class Profile;
......@@ -67,13 +71,13 @@ class BrowsingDataQuotaHelper
virtual void RevokeHostQuota(const std::string& host) = 0;
protected:
explicit BrowsingDataQuotaHelper(base::MessageLoopProxy* io_thread_);
explicit BrowsingDataQuotaHelper(base::SingleThreadTaskRunner* io_thread_);
virtual ~BrowsingDataQuotaHelper();
private:
friend class base::DeleteHelper<BrowsingDataQuotaHelper>;
friend struct BrowsingDataQuotaHelperDeleter;
scoped_refptr<base::MessageLoopProxy> io_thread_;
scoped_refptr<base::SingleThreadTaskRunner> io_thread_;
DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelper);
};
......
......@@ -55,8 +55,8 @@ void BrowsingDataQuotaHelperImpl::RevokeHostQuota(const std::string& host) {
}
BrowsingDataQuotaHelperImpl::BrowsingDataQuotaHelperImpl(
base::MessageLoopProxy* ui_thread,
base::MessageLoopProxy* io_thread,
base::SingleThreadTaskRunner* ui_thread,
base::SingleThreadTaskRunner* io_thread,
storage::QuotaManager* quota_manager)
: BrowsingDataQuotaHelper(io_thread),
quota_manager_(quota_manager),
......
......@@ -31,8 +31,8 @@ class BrowsingDataQuotaHelperImpl : public BrowsingDataQuotaHelper {
void RevokeHostQuota(const std::string& host) override;
private:
BrowsingDataQuotaHelperImpl(base::MessageLoopProxy* ui_thread,
base::MessageLoopProxy* io_thread,
BrowsingDataQuotaHelperImpl(base::SingleThreadTaskRunner* ui_thread,
base::SingleThreadTaskRunner* io_thread,
storage::QuotaManager* quota_manager);
~BrowsingDataQuotaHelperImpl() override;
......@@ -61,8 +61,8 @@ class BrowsingDataQuotaHelperImpl : public BrowsingDataQuotaHelper {
bool is_fetching_;
scoped_refptr<base::MessageLoopProxy> ui_thread_;
scoped_refptr<base::MessageLoopProxy> io_thread_;
scoped_refptr<base::SingleThreadTaskRunner> ui_thread_;
scoped_refptr<base::SingleThreadTaskRunner> io_thread_;
base::WeakPtrFactory<BrowsingDataQuotaHelperImpl> weak_factory_;
friend class BrowsingDataQuotaHelper;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment