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

Side by Side Diff: chrome/browser/history/shortcuts_database.h

Issue 134853004: Migrate old Shortcuts DB data to conform to new type values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Trying to work around the copy as well as modification of v1.sql Created 6 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/history/shortcuts_backend.h" 16 #include "chrome/browser/history/shortcuts_backend.h"
17 #include "sql/connection.h" 17 #include "sql/connection.h"
18 #include "sql/meta_table.h"
18 #include "url/gurl.h" 19 #include "url/gurl.h"
19 20
20 namespace history { 21 namespace history {
21 22
22 // This class manages the shortcut provider table within the SQLite database 23 // This class manages the shortcut provider table within the SQLite database
23 // passed to the constructor. It expects the following schema: 24 // passed to the constructor. It expects the following schema:
24 // 25 //
25 // Note: The database stores time in seconds, UTC. 26 // Note: The database stores time in seconds, UTC.
26 // 27 //
27 // omni_box_shortcuts 28 // omni_box_shortcuts
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 75
75 virtual ~ShortcutsDatabase(); 76 virtual ~ShortcutsDatabase();
76 77
77 // Ensures that the table is present. 78 // Ensures that the table is present.
78 bool EnsureTable(); 79 bool EnsureTable();
79 80
80 // The sql database. Not valid until Init is called. 81 // The sql database. Not valid until Init is called.
81 sql::Connection db_; 82 sql::Connection db_;
82 base::FilePath database_path_; 83 base::FilePath database_path_;
83 84
85 sql::MetaTable meta_table_;
86
84 static const base::FilePath::CharType kShortcutsDatabaseName[]; 87 static const base::FilePath::CharType kShortcutsDatabaseName[];
85 88
86 DISALLOW_COPY_AND_ASSIGN(ShortcutsDatabase); 89 DISALLOW_COPY_AND_ASSIGN(ShortcutsDatabase);
87 }; 90 };
88 91
89 } // namespace history 92 } // namespace history
90 93
91 #endif // CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_ 94 #endif // CHROME_BROWSER_HISTORY_SHORTCUTS_DATABASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_database.cc ('k') | chrome/browser/history/shortcuts_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698