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

Unified Diff: chrome/browser/history/in_memory_url_index.h

Issue 352913002: Port HistoryService::ScheduleDBTask to CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lifetime of base::CancelableTaskTracker for HistoryModelWorker Created 6 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
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/history/in_memory_url_index.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/in_memory_url_index.h
diff --git a/chrome/browser/history/in_memory_url_index.h b/chrome/browser/history/in_memory_url_index.h
index 697ccad0f9f5d101eec4be6f119e9209f3af6da6..ebc7b7cc2cf34a789cb6f09f942ead0d1423b07d 100644
--- a/chrome/browser/history/in_memory_url_index.h
+++ b/chrome/browser/history/in_memory_url_index.h
@@ -17,7 +17,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
-#include "chrome/browser/common/cancelable_request.h"
+#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/history/history_db_task.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_url_index_types.h"
@@ -250,6 +250,12 @@ class InMemoryURLIndex : public content::NotificationObserver,
// Returns a pointer to our private data. For unit testing only.
URLIndexPrivateData* private_data() { return private_data_.get(); }
+ // Returns a pointer to our private data cancelable request tracker. For
+ // unit testing only.
+ base::CancelableTaskTracker* private_data_tracker() {
+ return &private_data_tracker_;
+ }
+
// Returns the set of whitelisted schemes. For unit testing only.
const std::set<std::string>& scheme_whitelist() { return scheme_whitelist_; }
@@ -277,7 +283,8 @@ class InMemoryURLIndex : public content::NotificationObserver,
RestoreCacheObserver* restore_cache_observer_;
SaveCacheObserver* save_cache_observer_;
- CancelableRequestConsumer cache_reader_consumer_;
+ base::CancelableTaskTracker private_data_tracker_;
+ base::CancelableTaskTracker cache_reader_tracker_;
content::NotificationRegistrar registrar_;
// Set to true once the shutdown process has begun.
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/history/in_memory_url_index.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698