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_STARRED_URL_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_STARRED_URL_DATABASE_H_ |
6 #define CHROME_BROWSER_HISTORY_STARRED_URL_DATABASE_H_ | 6 #define CHROME_BROWSER_HISTORY_STARRED_URL_DATABASE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... | |
27 // moved to a separate file. This file exists purely for historical reasons and | 27 // moved to a separate file. This file exists purely for historical reasons and |
28 // contains just enough to allow migration. | 28 // contains just enough to allow migration. |
29 class StarredURLDatabase : public URLDatabase { | 29 class StarredURLDatabase : public URLDatabase { |
30 public: | 30 public: |
31 // Must call InitStarTable() AND any additional init functions provided by | 31 // Must call InitStarTable() AND any additional init functions provided by |
32 // URLDatabase before using this class' functions. | 32 // URLDatabase before using this class' functions. |
33 StarredURLDatabase(); | 33 StarredURLDatabase(); |
34 virtual ~StarredURLDatabase(); | 34 virtual ~StarredURLDatabase(); |
35 | 35 |
36 protected: | 36 protected: |
37 // ID (both star_id and folder_id) of the bookmark bar. | |
38 // This entry always exists. | |
39 static const int64 kBookmarkBarID; | |
sky
2011/07/07 17:07:53
Move this after friends.
tfarina
2011/07/07 17:42:20
Done.
| |
40 | |
37 // The unit tests poke our innards. | 41 // The unit tests poke our innards. |
38 friend class HistoryTest; | 42 friend class HistoryTest; |
39 friend class StarredURLDatabaseTest; | 43 friend class StarredURLDatabaseTest; |
40 FRIEND_TEST_ALL_PREFIXES(HistoryTest, CreateStarFolder); | 44 FRIEND_TEST_ALL_PREFIXES(HistoryTest, CreateStarFolder); |
41 | 45 |
42 // Writes bookmarks to the specified file. | 46 // Writes bookmarks to the specified file. |
43 bool MigrateBookmarksToFile(const FilePath& path); | 47 bool MigrateBookmarksToFile(const FilePath& path); |
44 | 48 |
45 // Returns the database for the functions in this interface. | 49 // Returns the database for the functions in this interface. |
46 virtual sql::Connection& GetDB() = 0; | 50 virtual sql::Connection& GetDB() = 0; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 // Does the work of migrating bookmarks to a temporary file that | 181 // Does the work of migrating bookmarks to a temporary file that |
178 // BookmarkStorage will read from. | 182 // BookmarkStorage will read from. |
179 bool MigrateBookmarksToFileImpl(const FilePath& path); | 183 bool MigrateBookmarksToFileImpl(const FilePath& path); |
180 | 184 |
181 DISALLOW_COPY_AND_ASSIGN(StarredURLDatabase); | 185 DISALLOW_COPY_AND_ASSIGN(StarredURLDatabase); |
182 }; | 186 }; |
183 | 187 |
184 } // namespace history | 188 } // namespace history |
185 | 189 |
186 #endif // CHROME_BROWSER_HISTORY_STARRED_URL_DATABASE_H_ | 190 #endif // CHROME_BROWSER_HISTORY_STARRED_URL_DATABASE_H_ |
OLD | NEW |