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

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

Issue 872313005: Remove dependency on visitedlink from history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@init-prefs
Patch Set: Rebase Created 5 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 | « components/history/core/browser/url_database.h ('k') | components/history/core/browser/visit_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/visit_delegate.h
diff --git a/components/history/core/browser/visit_delegate.h b/components/history/core/browser/visit_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..a60e7a268237247f5aebeb0cd6215590ccbcb6e2
--- /dev/null
+++ b/components/history/core/browser/visit_delegate.h
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DELEGATE_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DELEGATE_H_
+
+#include <vector>
+
+#include "base/macros.h"
+
+class GURL;
+class HistoryService;
+
+namespace history {
+
+// VisitDelegate gets notified about URLs recorded as visited by the
+// HistoryService.
+class VisitDelegate {
+ public:
+ VisitDelegate();
+ virtual ~VisitDelegate();
+
+ // Called once HistoryService initialization is complete. Returns true if the
+ // initialization succeeded, false otherwise.
+ virtual bool Init(HistoryService* history_service) = 0;
+
+ // Called when an URL is recorded by HistoryService.
+ virtual void AddURL(const GURL& url) = 0;
+
+ // Called when a list of URLs are recorded by HistoryService.
+ virtual void AddURLs(const std::vector<GURL>& urls) = 0;
+
+ // Called when a list of URLs are removed from HistoryService.
+ virtual void DeleteURLs(const std::vector<GURL>& urls) = 0;
+
+ // Called when all URLs are removed from HistoryService.
+ virtual void DeleteAllURLs() = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VisitDelegate);
+};
+
+} // namespace history
+
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DELEGATE_H_
« no previous file with comments | « components/history/core/browser/url_database.h ('k') | components/history/core/browser/visit_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698