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

Unified Diff: chrome/browser/signin/fake_profile_oauth2_token_service.cc

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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: chrome/browser/signin/fake_profile_oauth2_token_service.cc
diff --git a/chrome/browser/signin/fake_profile_oauth2_token_service.cc b/chrome/browser/signin/fake_profile_oauth2_token_service.cc
index 6901cdf4d890b840551abeee04f0f9545a0b46a0..32461da0bc7b9f808d1d55e2fc7509061ad85477 100644
--- a/chrome/browser/signin/fake_profile_oauth2_token_service.cc
+++ b/chrome/browser/signin/fake_profile_oauth2_token_service.cc
@@ -5,7 +5,9 @@
#include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
FakeProfileOAuth2TokenService::PendingRequest::PendingRequest() {
}
@@ -190,12 +192,11 @@ void FakeProfileOAuth2TokenService::FetchOAuth2Token(
pending_requests_.push_back(pending_request);
if (auto_post_fetch_response_on_message_loop_) {
- base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
- &FakeProfileOAuth2TokenService::IssueAllTokensForAccount,
- weak_ptr_factory_.GetWeakPtr(),
- account_id,
- "access_token",
- base::Time::Max()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE,
+ base::Bind(&FakeProfileOAuth2TokenService::IssueAllTokensForAccount,
+ weak_ptr_factory_.GetWeakPtr(), account_id, "access_token",
+ base::Time::Max()));
}
}
« no previous file with comments | « chrome/browser/sessions/session_service_unittest.cc ('k') | chrome/browser/speech/extension_api/tts_extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698