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); |