| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BOOKMARKS_BOOKMARK_STORAGE_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_index.h" | 12 #include "chrome/browser/bookmarks/bookmark_index.h" |
| 13 #include "chrome/common/important_file_writer.h" | 13 #include "chrome/common/important_file_writer.h" |
| 14 #include "chrome/common/notification_observer.h" | 14 #include "chrome/common/notification_observer.h" |
| 15 #include "chrome/common/notification_registrar.h" | 15 #include "chrome/common/notification_registrar.h" |
| 16 | 16 |
| 17 class BookmarkModel; | 17 class BookmarkModel; |
| 18 class BookmarkNode; | 18 class BookmarkNode; |
| 19 class Profile; | 19 class Profile; |
| 20 class Task; | |
| 21 class Value; | |
| 22 | 20 |
| 23 // BookmarkLoadDetails is used by BookmarkStorage when loading bookmarks. | 21 // BookmarkLoadDetails is used by BookmarkStorage when loading bookmarks. |
| 24 // BookmarkModel creates a BookmarkLoadDetails and passes it (including | 22 // BookmarkModel creates a BookmarkLoadDetails and passes it (including |
| 25 // ownership) to BookmarkStorage. BoomarkStorage loads the bookmarks (and index) | 23 // ownership) to BookmarkStorage. BoomarkStorage loads the bookmarks (and index) |
| 26 // in the background thread, then calls back to the BookmarkModel (on the main | 24 // in the background thread, then calls back to the BookmarkModel (on the main |
| 27 // thread) when loading is done, passing ownership back to the BookmarkModel. | 25 // thread) when loading is done, passing ownership back to the BookmarkModel. |
| 28 // While loading BookmarkModel does not maintain references to the contents | 26 // While loading BookmarkModel does not maintain references to the contents |
| 29 // of the BookmarkLoadDetails, this ensures we don't have any threading | 27 // of the BookmarkLoadDetails, this ensures we don't have any threading |
| 30 // problems. | 28 // problems. |
| 31 class BookmarkLoadDetails { | 29 class BookmarkLoadDetails { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Path to temporary file created during migrating bookmarks from history. | 156 // Path to temporary file created during migrating bookmarks from history. |
| 159 const FilePath tmp_history_path_; | 157 const FilePath tmp_history_path_; |
| 160 | 158 |
| 161 // See class description of BookmarkLoadDetails for details on this. | 159 // See class description of BookmarkLoadDetails for details on this. |
| 162 scoped_ptr<BookmarkLoadDetails> details_; | 160 scoped_ptr<BookmarkLoadDetails> details_; |
| 163 | 161 |
| 164 DISALLOW_COPY_AND_ASSIGN(BookmarkStorage); | 162 DISALLOW_COPY_AND_ASSIGN(BookmarkStorage); |
| 165 }; | 163 }; |
| 166 | 164 |
| 167 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_ | 165 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_ |
| OLD | NEW |