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

Unified Diff: chrome/browser/policy/logging_work_scheduler.cc

Issue 7298012: Consolidate data storage and notifications in the cloud policy subsystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 5 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/policy/logging_work_scheduler.cc
diff --git a/chrome/browser/policy/logging_work_scheduler.cc b/chrome/browser/policy/logging_work_scheduler.cc
index 8585ac041010011f85f61f05b8f5c697014081b7..a5181bb7da52ed60be14942ce920cf84c8305a0b 100644
--- a/chrome/browser/policy/logging_work_scheduler.cc
+++ b/chrome/browser/policy/logging_work_scheduler.cc
@@ -142,8 +142,9 @@ void LoggingWorkScheduler::PostDelayedWork(
}
void LoggingWorkScheduler::CancelDelayedWork() {
- DCHECK(callback_.get());
- callback_->Reset();
+ if (!callback_.get()) return;
+ callback_->Reset(); // Erase the callback to the delayed work.
+ callback_.reset(NULL); // Erase the pointer to the callback.
}
} // namespace policy
« no previous file with comments | « chrome/browser/policy/device_token_fetcher_unittest.cc ('k') | chrome/browser/policy/testing_cloud_policy_subsystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698