OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "chrome/browser/history/download_database.h" | 11 #include "chrome/browser/history/download_database.h" |
12 #include "chrome/browser/history/history_types.h" | 12 #include "chrome/browser/history/history_types.h" |
13 #include "chrome/browser/history/starred_url_database.h" | 13 #include "chrome/browser/history/starred_url_database.h" |
14 #include "chrome/browser/history/url_database.h" | 14 #include "chrome/browser/history/url_database.h" |
15 #include "chrome/browser/history/visit_database.h" | 15 #include "chrome/browser/history/visit_database.h" |
16 #include "chrome/browser/history/visitsegment_database.h" | 16 #include "chrome/browser/history/visitsegment_database.h" |
17 #include "sql/connection.h" | 17 #include "sql/connection.h" |
18 #include "sql/init_status.h" | 18 #include "sql/init_status.h" |
19 #include "sql/meta_table.h" | 19 #include "sql/meta_table.h" |
20 | 20 |
21 class FilePath; | 21 class FilePath; |
22 | 22 |
23 namespace history { | 23 namespace history { |
24 | 24 |
25 // Forward declaration for the temporary migration code in Init(). | |
26 class TextDatabaseManager; | |
27 | |
28 // Encapsulates the SQL connection for the history database. This class holds | 25 // Encapsulates the SQL connection for the history database. This class holds |
29 // the database connection and has methods the history system (including full | 26 // the database connection and has methods the history system (including full |
30 // text search) uses for writing and retrieving information. | 27 // text search) uses for writing and retrieving information. |
31 // | 28 // |
32 // We try to keep most logic out of the history database; this should be seen | 29 // We try to keep most logic out of the history database; this should be seen |
33 // as the storage interface. Logic for manipulating this storage layer should | 30 // as the storage interface. Logic for manipulating this storage layer should |
34 // be in HistoryBackend.cc. | 31 // be in HistoryBackend.cc. |
35 class HistoryDatabase : public DownloadDatabase, | 32 class HistoryDatabase : public DownloadDatabase, |
36 // TODO(sky): See if we can nuke StarredURLDatabase and just create on the | 33 // TODO(sky): See if we can nuke StarredURLDatabase and just create on the |
37 // stack for migration. Then HistoryDatabase would directly descend from | 34 // stack for migration. Then HistoryDatabase would directly descend from |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 sql::MetaTable meta_table_; | 171 sql::MetaTable meta_table_; |
175 | 172 |
176 base::Time cached_early_expiration_threshold_; | 173 base::Time cached_early_expiration_threshold_; |
177 | 174 |
178 // See the getters above. | 175 // See the getters above. |
179 bool needs_version_17_migration_; | 176 bool needs_version_17_migration_; |
180 | 177 |
181 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); | 178 DISALLOW_COPY_AND_ASSIGN(HistoryDatabase); |
182 }; | 179 }; |
183 | 180 |
184 } // history | 181 } // namespace history |
185 | 182 |
186 #endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ | 183 #endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_ |
OLD | NEW |