diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-10 02:16:05 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-10 02:16:05 +0000 |
commit | 8c4a580917a5f379b4a9e67145ed78a347151181 (patch) | |
tree | 4660d34698629c72ba45dba260d4c970864f6c49 /chrome/common | |
parent | 60142d98de42fad6bc63b37b063d565a3ab85f0b (diff) | |
download | chromium_src-8c4a580917a5f379b4a9e67145ed78a347151181.zip chromium_src-8c4a580917a5f379b4a9e67145ed78a347151181.tar.gz chromium_src-8c4a580917a5f379b4a9e67145ed78a347151181.tar.bz2 |
Bring a bunch more headers into the non-Windows build:
- history
- autocomplete
- bookmarks
These were all reviewed separately but turned out to be interdependent. :~(
Review URL: http://codereview.chromium.org/21170
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9444 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_constants.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_constants.h | 2 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 98 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 79 |
4 files changed, 101 insertions, 81 deletions
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index a0ae25b..494d3b0 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -42,7 +42,8 @@ const wchar_t kUserDataDirname[] = L"User Data"; const FilePath::CharType kUserScriptsDirname[] = FPL("User Scripts"); const FilePath::CharType kWebDataFilename[] = FPL("Web Data"); const FilePath::CharType kBookmarksFileName[] = FPL("Bookmarks"); -const wchar_t kHistoryBookmarksFileName[] = L"Bookmarks From History"; +const FilePath::CharType kHistoryBookmarksFileName[] = + FPL("Bookmarks From History"); const wchar_t kCustomDictionaryFileName[] = L"Custom Dictionary.txt"; // Note, this shouldn't go above 64. See bug 535234. diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h index a752aba..0ddf579 100644 --- a/chrome/common/chrome_constants.h +++ b/chrome/common/chrome_constants.h @@ -37,7 +37,7 @@ extern const wchar_t kUserDataDirname[]; extern const FilePath::CharType kUserScriptsDirname[]; extern const FilePath::CharType kWebDataFilename[]; extern const FilePath::CharType kBookmarksFileName[]; -extern const wchar_t kHistoryBookmarksFileName[]; +extern const FilePath::CharType kHistoryBookmarksFileName[]; extern const wchar_t kCustomDictionaryFileName[]; extern const unsigned int kMaxRendererProcessCount; diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index bdee164..0aff7b7 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -12,6 +12,8 @@ #include "base/singleton.h" #include "base/task.h" #include "build/build_config.h" +#include "chrome/browser/autocomplete/autocomplete.h" +#include "chrome/browser/autocomplete/history_url_provider.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_shutdown.h" #include "chrome/browser/cache_manager_host.h" @@ -35,6 +37,7 @@ #include "webkit/glue/webcursor.h" #include "webkit/glue/webkit_glue.h" + // static size_t SessionRestore::num_tabs_to_load_ = 0; @@ -366,3 +369,98 @@ bool ClipboardIsFormatAvailable(Clipboard::FormatType format) { } // webkit_glue + +//-------------------------------------------------------------------------- +size_t AutocompleteProvider::max_matches_ = 42; +size_t AutocompleteResult::max_matches_ = 42; + +// static +std::string AutocompleteInput::TypeToString(Type type) { + NOTIMPLEMENTED(); + return ""; +} + +AutocompleteMatch::AutocompleteMatch(AutocompleteProvider* provider, + int relevance, + bool deletable, + Type type) { + NOTIMPLEMENTED(); +} + +// static +void AutocompleteMatch::ClassifyLocationInString( + size_t match_location, + size_t match_length, + size_t overall_length, + int style, + ACMatchClassifications* classifications) { + NOTIMPLEMENTED(); +} + +// static +std::string AutocompleteMatch::TypeToString(Type type) { + NOTIMPLEMENTED(); + return ""; +} + +AutocompleteProvider::~AutocompleteProvider() { + NOTIMPLEMENTED(); +} + +std::wstring AutocompleteProvider::StringForURLDisplay(const GURL& url, + bool check_accept_lang) { + NOTIMPLEMENTED(); + return L""; +} + +void HistoryURLProvider::ExecuteWithDB(history::HistoryBackend* backend, + history::URLDatabase* db, + HistoryURLProviderParams* params) { + NOTIMPLEMENTED(); +} + +//-------------------------------------------------------------------------- +namespace bookmark_utils { + +struct TitleMatch { + void* undefined; +}; + +void GetBookmarksMatchingText(BookmarkModel* model, + const std::wstring& text, + size_t max_count, + std::vector<TitleMatch>* matches) { + NOTIMPLEMENTED(); +} + +bool MoreRecentlyAdded(BookmarkNode* n1, BookmarkNode* n2) { + NOTIMPLEMENTED(); + return false; +} + +std::vector<BookmarkNode*> GetMostRecentlyModifiedGroups(BookmarkModel* model, + size_t max_count) { + NOTIMPLEMENTED(); + return std::vector<BookmarkNode*>(); +} + + +void GetBookmarksContainingText(BookmarkModel* model, + const std::wstring& text, + size_t max_count, + std::vector<BookmarkNode*>* nodes) { + NOTIMPLEMENTED(); +} + +bool DoesBookmarkContainText(BookmarkNode* node, const std::wstring& text) { + NOTIMPLEMENTED(); + return false; +} + +void GetMostRecentlyAddedEntries(BookmarkModel* model, + size_t count, + std::vector<BookmarkNode*>* nodes) { + NOTIMPLEMENTED(); +} + +} // bookmark_utils diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index 26a47c6..2e77074 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -204,75 +204,6 @@ class TabRestoreService : public base::RefCountedThreadSafe<TabRestoreService> { void RestoreMostRecentEntry(Browser*) { NOTIMPLEMENTED(); } }; -namespace history { - -class ExpireHistoryBackend { - public: - BookmarkService* bookmark_service_; -}; - -class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend> { - public: - BookmarkService* bookmark_service_; - ExpireHistoryBackend expirer_; -}; - -class HistoryDatabase { - public: - static std::string GURLToDatabaseURL(const GURL& url) { - NOTIMPLEMENTED(); - return ""; - } -}; - -} - -class HistoryService { - public: - class URLEnumerator { - public: - virtual ~URLEnumerator() {} - virtual void OnURL(const GURL& url) = 0; - virtual void OnComplete(bool success) = 0; - }; - class Handle { - public: - }; - HistoryService() {} - HistoryService(Profile* profile) {} - bool Init(const FilePath& history_dir, BookmarkService* bookmark_service) { - NOTIMPLEMENTED(); - return false; - } - void SetOnBackendDestroyTask(Task*) { NOTIMPLEMENTED(); } - void AddPage(GURL const&, void const*, int, GURL const&, - int, std::vector<GURL> const&) { NOTIMPLEMENTED(); } - void AddPage(const GURL& url) { NOTIMPLEMENTED(); } - void SetPageContents(const GURL& url, const std::wstring& contents) { - NOTIMPLEMENTED(); - } - void IterateURLs(URLEnumerator* iterator) { NOTIMPLEMENTED(); } - void DeleteAllSearchTermsForKeyword(long long) { NOTIMPLEMENTED(); } - void SetKeywordSearchTermsForURL(const GURL& url, - long long keyword_id, - const std::wstring& term) { - NOTIMPLEMENTED(); - } - void NotifyRenderProcessHostDestruction(int) { NOTIMPLEMENTED(); }; - void Cleanup() { NOTIMPLEMENTED(); } - void AddRef() { NOTIMPLEMENTED(); } - void Release() { NOTIMPLEMENTED(); } - void SetFavIconOutOfDateForPage(const GURL&) { NOTIMPLEMENTED(); } - void SetPageThumbnail(const GURL&, const SkBitmap&, const ThumbnailScore&) { - NOTIMPLEMENTED(); - } - void SetPageTitle(const GURL&, const std::wstring&) { - NOTIMPLEMENTED(); - } - - scoped_refptr<history::HistoryBackend> history_backend_; -}; - class MetricsService { public: MetricsService() { } @@ -876,16 +807,6 @@ class WebAppLauncher { } }; -class AutocompleteResult { - public: - static void set_max_matches(int) { NOTIMPLEMENTED(); } -}; - -class AutocompleteProvider { - public: - static void set_max_matches(int) { NOTIMPLEMENTED(); } -}; - class URLFixerUpper { public: static std::wstring FixupRelativeFile(const std::wstring& base_dir, |