OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SHORTCUTS_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_ |
6 #define CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_ | 6 #define CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "sql/connection.h" | 16 #include "sql/connection.h" |
| 17 #include "sql/meta_table.h" |
17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
18 | 19 |
19 namespace history { | 20 namespace history { |
20 | 21 |
21 // This class manages the shortcut provider table within the SQLite database | 22 // This class manages the shortcut provider table within the SQLite database |
22 // passed to the constructor. It expects the following schema: | 23 // passed to the constructor. It expects the following schema: |
23 // | 24 // |
24 // Note: The database stores time in seconds, UTC. | 25 // Note: The database stores time in seconds, UTC. |
25 // | 26 // |
26 // omni_box_shortcuts | 27 // omni_box_shortcuts |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 120 |
120 virtual ~ShortcutsDatabase(); | 121 virtual ~ShortcutsDatabase(); |
121 | 122 |
122 // Ensures that the table is present. | 123 // Ensures that the table is present. |
123 bool EnsureTable(); | 124 bool EnsureTable(); |
124 | 125 |
125 // The sql database. Not valid until Init is called. | 126 // The sql database. Not valid until Init is called. |
126 sql::Connection db_; | 127 sql::Connection db_; |
127 base::FilePath database_path_; | 128 base::FilePath database_path_; |
128 | 129 |
| 130 sql::MetaTable meta_table_; |
| 131 |
129 static const base::FilePath::CharType kShortcutsDatabaseName[]; | 132 static const base::FilePath::CharType kShortcutsDatabaseName[]; |
130 | 133 |
131 DISALLOW_COPY_AND_ASSIGN(ShortcutsDatabase); | 134 DISALLOW_COPY_AND_ASSIGN(ShortcutsDatabase); |
132 }; | 135 }; |
133 | 136 |
134 } // namespace history | 137 } // namespace history |
135 | 138 |
136 #endif // CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_ | 139 #endif // CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_ |
OLD | NEW |