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

Unified Diff: chrome/browser/visitedlink/visitedlink_master.h

Issue 8892023: Eliminated the last few uses of MessageLoop::QuitTask in chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more... Created 9 years 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 | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/visitedlink/visitedlink_master.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/visitedlink/visitedlink_master.h
diff --git a/chrome/browser/visitedlink/visitedlink_master.h b/chrome/browser/visitedlink/visitedlink_master.h
index 87de1531998b512d75696ff1437bad28a1415042..c84e809e2f3999cf757fc7edd139398af2b8a06a 100644
--- a/chrome/browser/visitedlink/visitedlink_master.h
+++ b/chrome/browser/visitedlink/visitedlink_master.h
@@ -12,6 +12,7 @@
#include <set>
#include <vector>
+#include "base/callback_forward.h"
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
@@ -102,9 +103,9 @@ class VisitedLinkMaster : public VisitedLinkCommon {
// Sets a task to execute when the next rebuild from history is complete.
// This is used by unit tests to wait for the rebuild to complete before
// they continue. The pointer will be owned by this object after the call.
- void set_rebuild_complete_task(Task* task) {
- DCHECK(!rebuild_complete_task_.get());
- rebuild_complete_task_.reset(task);
+ void set_rebuild_complete_task(const base::Closure& task) {
+ DCHECK(rebuild_complete_task_.is_null());
+ rebuild_complete_task_ = task;
}
// returns the number of items in the table for testing verification
@@ -359,9 +360,9 @@ class VisitedLinkMaster : public VisitedLinkCommon {
// BrowserProcess. This is provided for unit tests.
HistoryService* history_service_override_;
- // When non-NULL, indicates the task that should be run after the next
- // rebuild from history is complete.
- scoped_ptr<Task> rebuild_complete_task_;
+ // When set, indicates the task that should be run after the next rebuild from
+ // history is complete.
+ base::Closure rebuild_complete_task_;
// Set to prevent us from attempting to rebuild the database from global
// history if we have an error opening the file. This is used for testing,
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/visitedlink/visitedlink_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698