OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_VISITEDLINK_VISITEDLINK_DELEGATE_H_ | 5 #ifndef COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ |
6 #define CHROME_BROWSER_VISITEDLINK_VISITEDLINK_DELEGATE_H_ | 6 #define COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class BrowserContext; | 13 class BrowserContext; |
14 } // namespace content | 14 } // namespace content |
15 | 15 |
| 16 namespace components { |
| 17 |
16 // Delegate class that clients of VisitedLinkMaster must implement. | 18 // Delegate class that clients of VisitedLinkMaster must implement. |
17 class VisitedLinkDelegate { | 19 class VisitedLinkDelegate { |
18 public: | 20 public: |
19 // Returns true when the two BrowserContexts are equivalent. | 21 // Returns true when the two BrowserContexts are equivalent. |
20 virtual bool AreEquivalentContexts(content::BrowserContext* context1, | 22 virtual bool AreEquivalentContexts(content::BrowserContext* context1, |
21 content::BrowserContext* context2) = 0; | 23 content::BrowserContext* context2) = 0; |
22 | 24 |
23 // See RebuildTable. | 25 // See RebuildTable. |
24 class URLEnumerator : public base::RefCountedThreadSafe<URLEnumerator> { | 26 class URLEnumerator : public base::RefCountedThreadSafe<URLEnumerator> { |
25 public: | 27 public: |
(...skipping 16 matching lines...) Expand all Loading... |
42 // across browser runs. This is called by VisitedLinkMaster to repopulate | 44 // across browser runs. This is called by VisitedLinkMaster to repopulate |
43 // its internal table. Note that methods on enumerator can be called on any | 45 // its internal table. Note that methods on enumerator can be called on any |
44 // thread but the delegate is responsible for synchronizating the calls. | 46 // thread but the delegate is responsible for synchronizating the calls. |
45 virtual void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) = 0; | 47 virtual void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) = 0; |
46 | 48 |
47 protected: | 49 protected: |
48 | 50 |
49 virtual ~VisitedLinkDelegate() {} | 51 virtual ~VisitedLinkDelegate() {} |
50 }; | 52 }; |
51 | 53 |
52 #endif // CHROME_BROWSER_VISITEDLINK_VISITEDLINK_DELEGATE_H_ | 54 } // namespace components |
| 55 |
| 56 #endif // COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_DELEGATE_H_ |
OLD | NEW |