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

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

Issue 164703002: Don't leak WebHistoryService::Request on HistoryService shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | chrome/browser/history/history_service.cc » ('j') | chrome/browser/history/history_service.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_service.h
diff --git a/chrome/browser/history/history_service.h b/chrome/browser/history/history_service.h
index cf061deab7a2ec9d345d5a5f96f2df688ed2a7bf..95d88a97a48a33948c76163416e6dde34decfe34 100644
--- a/chrome/browser/history/history_service.h
+++ b/chrome/browser/history/history_service.h
@@ -26,6 +26,7 @@
#include "chrome/browser/history/delete_directive_handler.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/typed_url_syncable_service.h"
+#include "chrome/browser/history/web_history_service.h"
#include "chrome/browser/search_engines/template_url_id.h"
#include "chrome/common/ref_counted_util.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
@@ -816,6 +817,11 @@ class HistoryService : public CancelableRequestProvider,
// specified priority. The task will have ownership taken.
void ScheduleTask(SchedulePriority priority, const base::Closure& task);
+ // Cleans up after a WebHistoryService::Request completes.
+ void WebHistoryServiceRequestComplete(
+ history::WebHistoryService::Request* request,
+ bool success);
+
// Schedule ------------------------------------------------------------------
//
// Functions for scheduling operations on the history thread that have a
@@ -1067,6 +1073,11 @@ class HistoryService : public CancelableRequestProvider,
history::DeleteDirectiveHandler delete_directive_handler_;
+ // Maintain the set of pending WebHistoryService requests so they may all be
+ // cancelled on profile shutdown.
+ std::set<history::WebHistoryService::Request*>
+ pending_web_history_service_requests_;
+
DISALLOW_COPY_AND_ASSIGN(HistoryService);
};
« no previous file with comments | « no previous file | chrome/browser/history/history_service.cc » ('j') | chrome/browser/history/history_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698