Chromium Code Reviews| Index: android_webview/browser/aw_browser_context.h |
| diff --git a/android_webview/browser/aw_browser_context.h b/android_webview/browser/aw_browser_context.h |
| index 0e4708bae163bc87d502f7f73105a321e85868a3..40e42b5ef909faa5b646d5d3a5c1b7f4d0fdb609 100644 |
| --- a/android_webview/browser/aw_browser_context.h |
| +++ b/android_webview/browser/aw_browser_context.h |
| @@ -5,28 +5,46 @@ |
| #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
| #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
| +#include <vector> |
| + |
| #include "android_webview/browser/aw_download_manager_delegate.h" |
| #include "base/file_path.h" |
| #include "base/memory/ref_counted.h" |
| +#include "components/visitedlink/browser/visitedlink_delegate.h" |
| #include "content/public/browser/browser_context.h" |
| #include "content/public/browser/geolocation_permission_context.h" |
| +class GURL; |
| + |
| +namespace components { |
| +class VisitedLinkMaster; |
| +} // namespace components |
| + |
| namespace android_webview { |
| class AwURLRequestContextGetter; |
| typedef content::GeolocationPermissionContext* GeolocationPermissionFactoryFn(); |
| -class AwBrowserContext : public content::BrowserContext { |
| +class AwBrowserContext : public content::BrowserContext, |
| + public components::VisitedLinkDelegate { |
| public: |
| + |
| AwBrowserContext( |
| const FilePath path, |
| GeolocationPermissionFactoryFn* geolocation_permission_factory); |
| virtual ~AwBrowserContext(); |
| + // Returns the AwBrowserContext corresponding to the given browser context. |
| + static AwBrowserContext* FromBrowserContext( |
| + content::BrowserContext* browser_context); |
| + |
| // Called before BrowserThreads are created. |
| void InitializeBeforeThreadCreation(); |
| + // Maps to BrowserMainParts::PreMainMessageLoopRun. |
| + void PreMainMessageLoopRun(); |
| + |
| // content::BrowserContext implementation. |
| virtual FilePath GetPath() OVERRIDE; |
| virtual bool IsOffTheRecord() const OVERRIDE; |
| @@ -50,6 +68,18 @@ class AwBrowserContext : public content::BrowserContext { |
| GetSpeechRecognitionPreferences() OVERRIDE; |
| virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
| + // These methods map to Add methods in components::VisitedLinkMaster. |
| + void AddVisitedURL(const GURL& url); |
| + void AddVisitedURLs(const std::vector<GURL>& urls); |
|
joth
2013/01/16 01:10:02
nit: put this up before all the virtual overrides.
boliu
2013/01/16 01:58:44
Done, and cc file too
|
| + |
| + // components::VisitedLinkDelegate implementation. |
| + virtual bool PersistToDisk() const OVERRIDE; |
| + virtual bool AreEquivalentContexts( |
| + content::BrowserContext* context1, |
| + content::BrowserContext* context2) OVERRIDE; |
| + virtual void RebuildTable( |
| + const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; |
| + |
| private: |
| // The file path where data for this context is persisted. |
| @@ -62,6 +92,8 @@ class AwBrowserContext : public content::BrowserContext { |
| AwDownloadManagerDelegate download_manager_delegate_; |
| + scoped_ptr<components::VisitedLinkMaster> visitedlink_master_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
| }; |