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

Side by Side Diff: chrome/browser/visitedlink/visitedlink_delegate.h

Issue 11784006: Revert "Remove VisitedLink dependency on rest of chrome" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_VISITEDLINK_VISITEDLINK_DELEGATE_H_
6 #define CHROME_BROWSER_VISITEDLINK_VISITEDLINK_DELEGATE_H_
7
8 class GURL;
9
10 namespace content {
11 class BrowserContext;
12 } // namespace content
13
14 // Delegate class that clients of VisitedLinkMaster must implement.
15 class VisitedLinkDelegate {
16 public:
17 // Returns true when the two BrowserContexts are equivalent.
18 virtual bool AreEquivalentContexts(content::BrowserContext* context1,
19 content::BrowserContext* context2) = 0;
20
21 // See RebuildTable.
22 class URLEnumerator {
23 public:
24 // Call this with each URL to rebuild the table.
25 virtual void OnURL(const GURL& url) = 0;
26
27 // This must be called by Delegate after RebuildTable is called. |success|
28 // indicates all URLs have been returned successfully. The URLEnumerator
29 // object cannot be used by the delegate after this call.
30 virtual void OnComplete(bool success) = 0;
31
32 protected:
33 virtual ~URLEnumerator() {}
34 };
35
36 // Delegate class is responsible for persisting the list of visited URLs
37 // across browser runs. This is called by VisitedLinkMaster to repopulate
38 // its internal table. Note that methods on enumerator can be called on any
39 // thread but the delegate is responsible for synchronizating the calls.
40 virtual void RebuildTable(URLEnumerator* enumerator) = 0;
41
42 protected:
43 virtual ~VisitedLinkDelegate() {}
44 };
45
46 #endif // CHROME_BROWSER_VISITEDLINK_VISITEDLINK_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_dependency_manager.cc ('k') | chrome/browser/visitedlink/visitedlink_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698