summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/visit_database.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 05:01:42 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 05:01:42 +0000
commit765b445022c7f2a24bc862b45d48ece4ca9a77e1 (patch)
tree9f351b1203bbfd02fae7018a1f11e2f15b6eeacb /chrome/browser/history/visit_database.h
parenteb6f2c542d7405788d668a762282b66655836e1d (diff)
downloadchromium_src-765b445022c7f2a24bc862b45d48ece4ca9a77e1.zip
chromium_src-765b445022c7f2a24bc862b45d48ece4ca9a77e1.tar.gz
chromium_src-765b445022c7f2a24bc862b45d48ece4ca9a77e1.tar.bz2
Convert history to use new sql wrappers. Enhance wrappers in several ways to
support the needs of history. BUG=none TEST=covered by unit tests Review URL: http://codereview.chromium.org/246053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/visit_database.h')
-rw-r--r--chrome/browser/history/visit_database.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/chrome/browser/history/visit_database.h b/chrome/browser/history/visit_database.h
index 9fa4601..8613ace 100644
--- a/chrome/browser/history/visit_database.h
+++ b/chrome/browser/history/visit_database.h
@@ -1,15 +1,16 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_VISIT_DATABASE_H__
-#define CHROME_BROWSER_HISTORY_VISIT_DATABASE_H__
+#ifndef CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
+#define CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
#include "chrome/browser/history/history_types.h"
-struct sqlite3;
-class SqliteStatementCache;
-class SQLStatement;
+namespace sql {
+class Connection;
+class Statement;
+}
namespace history {
@@ -144,11 +145,8 @@ class VisitDatabase {
bool GetStartDate(base::Time* first_visit);
protected:
- // Returns the database and statement cache for the functions in this
- // interface. The decendent of this class implements these functions to
- // return its objects.
- virtual sqlite3* GetDB() = 0;
- virtual SqliteStatementCache& GetStatementCache() = 0;
+ // Returns the database for the functions in this interface.
+ virtual sql::Connection& GetDB() = 0;
// Called by the derived classes on initialization to make sure the tables
// and indices are properly set up. Must be called before anything else.
@@ -156,16 +154,16 @@ class VisitDatabase {
// Convenience to fill a VisitRow. Assumes the visit values are bound starting
// at index 0.
- static void FillVisitRow(SQLStatement& statement, VisitRow* visit);
+ static void FillVisitRow(sql::Statement& statement, VisitRow* visit);
// Convenience to fill a VisitVector. Assumes that statement.step()
// hasn't happened yet.
- static void FillVisitVector(SQLStatement& statement, VisitVector* visits);
+ static void FillVisitVector(sql::Statement& statement, VisitVector* visits);
private:
- DISALLOW_EVIL_CONSTRUCTORS(VisitDatabase);
+ DISALLOW_COPY_AND_ASSIGN(VisitDatabase);
};
} // history
-#endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H__
+#endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_