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

Unified Diff: components/sessions/core/base_session_service.cc

Issue 2404353002: Remove MessageLoop::current() from base_session_service.cc. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sessions/core/base_session_service.cc
diff --git a/components/sessions/core/base_session_service.cc b/components/sessions/core/base_session_service.cc
index 3883b0cde372ac658e87a54069907e11ad008888..edc2431507c16ed56108b87220e30ad688b636b3 100644
--- a/components/sessions/core/base_session_service.cc
+++ b/components/sessions/core/base_session_service.cc
@@ -117,8 +117,8 @@ void BaseSessionService::ClearPendingCommands() {
void BaseSessionService::StartSaveTimer() {
// Don't start a timer when testing.
- if (delegate_->ShouldUseDelayedSave() && base::MessageLoop::current() &&
- !weak_factory_.HasWeakPtrs()) {
+ if (delegate_->ShouldUseDelayedSave() &&
+ base::ThreadTaskRunnerHandle::IsSet() && !weak_factory_.HasWeakPtrs()) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&BaseSessionService::Save, weak_factory_.GetWeakPtr()),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698