diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 17:13:02 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 17:13:02 +0000 |
commit | 6e01dae641ad11e7600dec30de45b506b8d21c0c (patch) | |
tree | bc27f693251a8e602fbdf65c50fd4379cd48959c /chrome/common/temp_scaffolding_stubs.h | |
parent | 25fa78c2ffe3e98231cfb22f4005452da85b201c (diff) | |
download | chromium_src-6e01dae641ad11e7600dec30de45b506b8d21c0c.zip chromium_src-6e01dae641ad11e7600dec30de45b506b8d21c0c.tar.gz chromium_src-6e01dae641ad11e7600dec30de45b506b8d21c0c.tar.bz2 |
First step of porting VisitedLinkMaster to POSIX:
* Use POSIX file access APIs rather than HANDLEs.
* Add stubs so that VisitedLinkMaster compiles on POSIX.
Still to be done:
* Bring up Surrounding infrastructure to turn on unit tests.
Review URL: http://codereview.chromium.org/18530
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/temp_scaffolding_stubs.h')
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index aad59bd..e6264da 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -22,14 +22,19 @@ #include "webkit/glue/window_open_disposition.h" class Browser; +class BookmarkService; class CommandLine; +class HistoryService; class MetricsService; class NavigationEntry; class ProfileManager; class Profile; class SessionID; +class SpellChecker; class TabContents; class URLRequestContext; +class UserScriptMaster; +class VisitedLinkMaster; class WebContents; //--------------------------------------------------------------------------- @@ -175,24 +180,63 @@ class TabRestoreService { void BrowserClosed(Browser*) { } }; +class HistoryService { + public: + + class URLEnumerator { + public: + virtual ~URLEnumerator() {} + virtual void OnURL(const GURL& url) = 0; + virtual void OnComplete(bool success) = 0; + }; + + HistoryService() {} + bool Init(const std::wstring& history_dir, BookmarkService* bookmark_service) + { return false; } + void SetOnBackendDestroyTask(Task*) {} + void AddPage(GURL const&, void const*, int, GURL const&, + int, std::vector<GURL> const&) {} + void AddPage(const GURL& url) {} + void SetPageContents(const GURL& url, const std::wstring& contents) {} + void IterateURLs(URLEnumerator* iterator) {} + void Cleanup() {} + void AddRef() {} + void Release() {} +}; + class Profile { public: + enum ServiceAccessType { + EXPLICIT_ACCESS, + IMPLICIT_ACCESS + }; + + public: Profile(const std::wstring& user_data_dir); virtual std::wstring GetPath() { return path_; } virtual PrefService* GetPrefs(); void ResetTabRestoreService() { } + SpellChecker* GetSpellChecker() { return NULL; } + VisitedLinkMaster* GetVisitedLinkMaster() { return NULL; } TabRestoreService* GetTabRestoreService() { return NULL; } SessionService* GetSessionService() { return NULL; } + UserScriptMaster* GetUserScriptMaster() { return NULL; } bool IsOffTheRecord() { return false; } URLRequestContext* GetRequestContext() { return NULL; } virtual Profile* GetOriginalProfile() { return this; } virtual Profile* GetOffTheRecordProfile() { return this; } bool HasSessionService() { return false; } + std::wstring GetID() { return L""; } + HistoryService* GetHistoryService(ServiceAccessType access) { + return &history_service_; + } + private: std::wstring GetPrefFilePath(); std::wstring path_; scoped_ptr<PrefService> prefs_; + HistoryService history_service_; }; class ProfileManager : NonThreadSafe { |