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

Unified Diff: components/history/core/browser/web_history_service.h

Issue 2263613002: Make BrowsingDataHandler observe WebHistoryService deletions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved comments inside 'if'. Created 4 years, 4 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 | « components/history/core/browser/BUILD.gn ('k') | components/history/core/browser/web_history_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/web_history_service.h
diff --git a/components/history/core/browser/web_history_service.h b/components/history/core/browser/web_history_service.h
index 0b6c08bdc86839c3ef68300382d6a3bcb7c1ac5a..d5681a8d0f5db7dd9cab9d7e3091fd8d0704e021 100644
--- a/components/history/core/browser/web_history_service.h
+++ b/components/history/core/browser/web_history_service.h
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
#include "components/history/core/browser/history_types.h"
#include "components/keyed_service/core/keyed_service.h"
@@ -34,6 +35,8 @@ class SigninManagerBase;
namespace history {
+class WebHistoryServiceObserver;
+
// Provides an API for querying Google servers for a signed-in user's
// synced history visits. It is roughly analogous to HistoryService, and
// supports a similar API.
@@ -95,6 +98,9 @@ class WebHistoryService : public KeyedService {
const scoped_refptr<net::URLRequestContextGetter>& request_context);
~WebHistoryService() override;
+ void AddObserver(WebHistoryServiceObserver* observer);
+ void RemoveObserver(WebHistoryServiceObserver* observer);
+
// Searches synced history for visits matching |text_query|. The timeframe to
// search, along with other options, is specified in |options|. If
// |text_query| is empty, all visits in the timeframe will be returned.
@@ -219,6 +225,9 @@ class WebHistoryService : public KeyedService {
// complete by profile shutdown.
std::set<Request*> pending_other_forms_of_browsing_history_requests_;
+ // Observers.
+ base::ObserverList<WebHistoryServiceObserver, true> observer_list_;
+
base::WeakPtrFactory<WebHistoryService> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(WebHistoryService);
« no previous file with comments | « components/history/core/browser/BUILD.gn ('k') | components/history/core/browser/web_history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698