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

Unified Diff: chrome/browser/history/history.h

Issue 343067: Unittest for fix to allow navigation when there is no history DB.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model_unittest.cc ('k') | chrome/browser/history/history.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history.h
===================================================================
--- chrome/browser/history/history.h (revision 30724)
+++ chrome/browser/history/history.h (working copy)
@@ -101,7 +101,9 @@
// not call any other functions. The given directory will be used for storing
// the history files. The BookmarkService is used when deleting URLs to
// test if a URL is bookmarked; it may be NULL during testing.
- bool Init(const FilePath& history_dir, BookmarkService* bookmark_service);
+ bool Init(const FilePath& history_dir, BookmarkService* bookmark_service) {
+ return Init(history_dir, bookmark_service, false);
+ }
// Triggers the backend to load if it hasn't already, and then returns whether
// it's finished loading.
@@ -545,6 +547,12 @@
const NotificationSource& source,
const NotificationDetails& details);
+ // Low-level Init(). Same as the public version, but adds a |no_db| parameter
+ // that is only set by unittests which causes the backend to not init its DB.
+ bool Init(const FilePath& history_dir,
+ BookmarkService* bookmark_service,
+ bool no_db);
+
// Called by the HistoryURLProvider class to schedule an autocomplete, it
// will be called back on the internal history thread with the history
// database so it can query. See history_autocomplete.cc for a diagram.
@@ -797,6 +805,7 @@
// Cached values from Init(), used whenever we need to reload the backend.
FilePath history_dir_;
BookmarkService* bookmark_service_;
+ bool no_db_;
DISALLOW_COPY_AND_ASSIGN(HistoryService);
};
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model_unittest.cc ('k') | chrome/browser/history/history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698