summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/download_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/download_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/download_database.h')
-rw-r--r--chrome/browser/history/download_database.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/chrome/browser/history/download_database.h b/chrome/browser/history/download_database.h
index e005de6..1efb6d4 100644
--- a/chrome/browser/history/download_database.h
+++ b/chrome/browser/history/download_database.h
@@ -1,17 +1,18 @@
-// 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_DOWNLOAD_DATABASE_H__
-#define CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H__
+#ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_
+#define CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_
#include "chrome/browser/history/history_types.h"
-struct sqlite3;
-class SqliteStatementCache;
-class SQLStatement;
struct DownloadCreateInfo;
+namespace sql {
+class Connection;
+}
+
namespace history {
// Maintains a table of downloads.
@@ -47,11 +48,8 @@ class DownloadDatabase {
const std::wstring& search_text);
protected:
- // Returns the database and statement cache for the functions in this
- // interface. The descendant 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;
// Creates the downloads table if needed.
bool InitDownloadTable();
@@ -61,9 +59,9 @@ class DownloadDatabase {
bool DropDownloadTable();
private:
- DISALLOW_EVIL_CONSTRUCTORS(DownloadDatabase);
+ DISALLOW_COPY_AND_ASSIGN(DownloadDatabase);
};
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H__
+#endif // CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_