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

Unified Diff: chrome/browser/bookmarks/bookmark_storage.cc

Issue 155456: Try the original CL "Always persist bookmark IDs" again with the fix to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_storage.h ('k') | chrome/browser/extensions/extension_bookmarks_module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_storage.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_storage.cc (revision 20552)
+++ chrome/browser/bookmarks/bookmark_storage.cc (working copy)
@@ -68,13 +68,11 @@
LoadTask(const FilePath& path,
MessageLoop* loop,
BookmarkStorage* storage,
- LoadDetails* details,
- bool persist_ids)
+ LoadDetails* details)
: path_(path),
loop_(loop),
storage_(storage),
- details_(details),
- persist_ids_(persist_ids) {
+ details_(details) {
}
virtual void Run() {
@@ -86,14 +84,15 @@
if (root.get()) {
// Building the index cane take a while, so we do it on the background
// thread.
- int max_node_id = 0;
- BookmarkCodec codec(persist_ids_);
+ int64 max_node_id = 0;
+ BookmarkCodec codec;
TimeTicks start_time = TimeTicks::Now();
codec.Decode(details_->bb_node(), details_->other_folder_node(),
&max_node_id, *root.get());
details_->set_max_id(std::max(max_node_id, details_->max_id()));
details_->set_computed_checksum(codec.computed_checksum());
details_->set_stored_checksum(codec.stored_checksum());
+ details_->set_ids_reassigned(codec.ids_reassigned());
UMA_HISTOGRAM_TIMES("Bookmarks.DecodeTime",
TimeTicks::Now() - start_time);
@@ -129,7 +128,6 @@
MessageLoop* loop_;
scoped_refptr<BookmarkStorage> storage_;
LoadDetails* details_;
- bool persist_ids_;
DISALLOW_COPY_AND_ASSIGN(LoadTask);
};
@@ -164,8 +162,7 @@
Task* task = new LoadTask(path,
backend_thread() ? MessageLoop::current() : NULL,
this,
- details_.get(),
- model_->PersistIDs());
+ details_.get());
RunTaskOnBackendThread(task);
}
@@ -211,7 +208,7 @@
}
bool BookmarkStorage::SerializeData(std::string* output) {
- BookmarkCodec codec(model_->PersistIDs());
+ BookmarkCodec codec;
scoped_ptr<Value> value(codec.Encode(model_));
JSONStringValueSerializer serializer(output);
serializer.set_pretty_print(true);
« no previous file with comments | « chrome/browser/bookmarks/bookmark_storage.h ('k') | chrome/browser/extensions/extension_bookmarks_module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698