| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_STORAGE_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_STORAGE_H_ |
| 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_STORAGE_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_STORAGE_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/important_file_writer.h" | 10 #include "base/files/important_file_writer.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 private: | 166 private: |
| 167 // Serializes the data and schedules save using ImportantFileWriter. | 167 // Serializes the data and schedules save using ImportantFileWriter. |
| 168 // Returns true on successful serialization. | 168 // Returns true on successful serialization. |
| 169 bool SaveNow(); | 169 bool SaveNow(); |
| 170 | 170 |
| 171 // The model. The model is NULL once BookmarkModelDeleted has been invoked. | 171 // The model. The model is NULL once BookmarkModelDeleted has been invoked. |
| 172 BookmarkModel* model_; | 172 BookmarkModel* model_; |
| 173 | 173 |
| 174 // Helper to write bookmark data safely. | 174 // Helper to write bookmark data safely. |
| 175 base::ImportantFileWriter writer_; | 175 scoped_ptr<base::ImportantFileWriterImpl> writer_; |
| 176 | 176 |
| 177 // Sequenced task runner where file I/O operations will be performed at. | 177 // Sequenced task runner where file I/O operations will be performed at. |
| 178 scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_; | 178 scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_; |
| 179 | 179 |
| 180 base::WeakPtrFactory<BookmarkStorage> weak_factory_; | 180 base::WeakPtrFactory<BookmarkStorage> weak_factory_; |
| 181 | 181 |
| 182 DISALLOW_COPY_AND_ASSIGN(BookmarkStorage); | 182 DISALLOW_COPY_AND_ASSIGN(BookmarkStorage); |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 } // namespace bookmarks | 185 } // namespace bookmarks |
| 186 | 186 |
| 187 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_STORAGE_H_ | 187 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_STORAGE_H_ |
| OLD | NEW |