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

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

Issue 8550006: Make HistoryDatabase own StarredURLDatabase instead of inheriting from it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky review Created 9 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/history/history_database.cc ('k') | chrome/browser/history/starred_url_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/starred_url_database.h
diff --git a/chrome/browser/history/starred_url_database.h b/chrome/browser/history/starred_url_database.h
index d6d1243693783754a27c155aee687bfe37fa58f2..fc513812b386fdf3934103ff45844b090ca2700a 100644
--- a/chrome/browser/history/starred_url_database.h
+++ b/chrome/browser/history/starred_url_database.h
@@ -9,6 +9,7 @@
#include <set>
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "base/string16.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/url_database.h"
@@ -16,10 +17,6 @@
class FilePath;
-namespace sql {
-class Connection;
-}
-
namespace history {
// Bookmarks were originally part of the url database, they have since been
@@ -27,11 +24,12 @@ namespace history {
// contains just enough to allow migration.
class StarredURLDatabase : public URLDatabase {
public:
- // Must call InitStarTable() AND any additional init functions provided by
- // URLDatabase before using this class' functions.
- StarredURLDatabase();
+ explicit StarredURLDatabase(sql::Connection* db);
virtual ~StarredURLDatabase();
+ // Writes bookmarks to the specified file.
+ bool MigrateBookmarksToFile(const FilePath& path);
+
protected:
friend class StarredURLDatabaseTest;
@@ -39,11 +37,8 @@ class StarredURLDatabase : public URLDatabase {
// This entry always exists.
static const int64 kBookmarkBarID;
- // Writes bookmarks to the specified file.
- bool MigrateBookmarksToFile(const FilePath& path);
-
// Returns the database for the functions in this interface.
- virtual sql::Connection& GetDB() = 0;
+ virtual sql::Connection& GetDB() OVERRIDE;
private:
// Used when checking integrity of starred table.
@@ -178,6 +173,8 @@ class StarredURLDatabase : public URLDatabase {
// BookmarkStorage will read from.
bool MigrateBookmarksToFileImpl(const FilePath& path);
+ sql::Connection* db_;
+
DISALLOW_COPY_AND_ASSIGN(StarredURLDatabase);
};
« no previous file with comments | « chrome/browser/history/history_database.cc ('k') | chrome/browser/history/starred_url_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698