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

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

Issue 7316013: history: Move kBookmarkBarID constant out of HistoryService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: after friends Created 9 years, 5 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
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/starred_url_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
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 // The unit tests poke our innards. 37 // The unit tests poke our innards.
38 friend class HistoryTest; 38 friend class HistoryTest;
39 friend class StarredURLDatabaseTest; 39 friend class StarredURLDatabaseTest;
40 FRIEND_TEST_ALL_PREFIXES(HistoryTest, CreateStarFolder); 40 FRIEND_TEST_ALL_PREFIXES(HistoryTest, CreateStarFolder);
41 41
42 // ID (both star_id and folder_id) of the bookmark bar.
43 // This entry always exists.
44 static const int64 kBookmarkBarID;
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;
47 51
48 private: 52 private:
49 // Makes sure the starred table is in a sane state. This does the following: 53 // Makes sure the starred table is in a sane state. This does the following:
50 // . Makes sure there is a bookmark bar and other nodes. If no bookmark bar 54 // . Makes sure there is a bookmark bar and other nodes. If no bookmark bar
51 // node is found, the table is dropped and recreated. 55 // node is found, the table is dropped and recreated.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/starred_url_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698