Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_HISTORY_CONTENT_VISIT_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_HISTORY_CONTENT_VISIT_DELEGATE_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
|
droger
2015/02/02 09:39:20
#include "base/macros.h"
sdefresne
2015/02/04 18:01:54
Done.
| |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "base/task/cancelable_task_tracker.h" | |
| 12 #include "components/history/core/browser/visit_delegate.h" | |
| 13 #include "components/visitedlink/browser/visitedlink_delegate.h" | |
| 14 | |
| 15 namespace content { | |
| 16 class BrowserContext; | |
| 17 } | |
| 18 | |
| 19 namespace visitedlink { | |
| 20 class VisitedLinkMaster; | |
| 21 } | |
| 22 | |
| 23 // ContentVisitDelegate bridge history::VisitDelegate events to | |
| 24 // visitedlink::VisitedLinkMaster. | |
| 25 class ContentVisitDelegate : public history::VisitDelegate, | |
| 26 public visitedlink::VisitedLinkDelegate { | |
| 27 public: | |
| 28 explicit ContentVisitDelegate(content::BrowserContext* browser_context); | |
| 29 ~ContentVisitDelegate() override; | |
| 30 | |
| 31 private: | |
| 32 // Implementation of history::VisitDelegate. | |
| 33 bool Init(HistoryService* history_service) override; | |
| 34 void AddURL(const GURL& url) override; | |
| 35 void AddURLs(const std::vector<GURL>& urls) override; | |
| 36 void DeleteURLs(const std::vector<GURL>& urls) override; | |
| 37 void DeleteAllURLs() override; | |
| 38 | |
| 39 // Implementation of visitedlink::VisitedLinkDelegate. | |
| 40 void RebuildTable(const scoped_refptr< | |
| 41 visitedlink::VisitedLinkDelegate::URLEnumerator>& enumerator) override; | |
| 42 | |
| 43 HistoryService* history_service_; // weak | |
|
droger
2015/02/02 09:39:21
Nit: Weak. (Capital + dot).
sdefresne
2015/02/04 18:01:54
Done.
| |
| 44 scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_; | |
| 45 base::CancelableTaskTracker task_tracker_; | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(ContentVisitDelegate); | |
| 48 }; | |
| 49 | |
| 50 | |
| 51 #endif // CHROME_BROWSER_HISTORY_CONTENT_VISIT_DELEGATE_H_ | |
| OLD | NEW |