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

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: Created 5 years, 11 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
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..5df0e60e4a53af4b815f696a6f99fdfacd8f5d72
--- /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>
+
droger 2015/02/02 09:39:20 #include "base/macros.h"
sdefresne 2015/02/04 18:01:54 Done.
+#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
droger 2015/02/02 09:39:21 Nit: Weak. (Capital + dot).
sdefresne 2015/02/04 18:01:54 Done.
+ 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 | « no previous file | chrome/browser/history/content_visit_delegate.cc » ('j') | chrome/browser/history/content_visit_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698