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

Side by Side Diff: components/bookmarks/browser/bookmark_storage.h

Issue 1127963002: Implement lossy pref behavior for JsonPrefStore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-fix-flags
Patch Set: Created 5 years, 7 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
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698