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

Unified Diff: chrome/browser/history/content_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 | « chrome/browser/history/DEPS ('k') | chrome/browser/history/content_visit_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/content_visit_delegate.h
diff --git a/chrome/browser/history/content_visit_delegate.h b/chrome/browser/history/content_visit_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..df98c72452436730e713fe22723b12361d864dd7
--- /dev/null
+++ b/chrome/browser/history/content_visit_delegate.h
@@ -0,0 +1,51 @@
+// 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 CHROME_BROWSER_HISTORY_CONTENT_VISIT_DELEGATE_H_
+#define CHROME_BROWSER_HISTORY_CONTENT_VISIT_DELEGATE_H_
+
+#include <vector>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/task/cancelable_task_tracker.h"
+#include "components/history/core/browser/visit_delegate.h"
+#include "components/visitedlink/browser/visitedlink_delegate.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace visitedlink {
+class VisitedLinkMaster;
+}
+
+// ContentVisitDelegate bridge history::VisitDelegate events to
+// visitedlink::VisitedLinkMaster.
+class ContentVisitDelegate : public history::VisitDelegate,
+ public visitedlink::VisitedLinkDelegate {
+ public:
+ explicit ContentVisitDelegate(content::BrowserContext* browser_context);
+ ~ContentVisitDelegate() override;
+
+ private:
+ // Implementation of history::VisitDelegate.
+ bool Init(HistoryService* history_service) override;
+ void AddURL(const GURL& url) override;
+ void AddURLs(const std::vector<GURL>& urls) override;
+ void DeleteURLs(const std::vector<GURL>& urls) override;
+ void DeleteAllURLs() override;
+
+ // Implementation of visitedlink::VisitedLinkDelegate.
+ void RebuildTable(const scoped_refptr<
+ visitedlink::VisitedLinkDelegate::URLEnumerator>& enumerator) override;
+
+ HistoryService* history_service_; // Weak.
+ scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_;
+ base::CancelableTaskTracker task_tracker_;
+
+ DISALLOW_COPY_AND_ASSIGN(ContentVisitDelegate);
+};
+
+#endif // CHROME_BROWSER_HISTORY_CONTENT_VISIT_DELEGATE_H_
« no previous file with comments | « chrome/browser/history/DEPS ('k') | chrome/browser/history/content_visit_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698