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

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

Issue 113882: Add a preference to enable/disable ID persistence in bookmark model and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.cc ('k') | no next file » | 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 16874)
+++ chrome/browser/bookmarks/bookmark_storage.cc (working copy)
@@ -68,11 +68,13 @@
LoadTask(const FilePath& path,
MessageLoop* loop,
BookmarkStorage* storage,
- LoadDetails* details)
+ LoadDetails* details,
+ bool persist_ids)
: path_(path),
loop_(loop),
storage_(storage),
- details_(details) {
+ details_(details),
+ persist_ids_(persist_ids) {
}
virtual void Run() {
@@ -85,7 +87,7 @@
// Building the index cane take a while, so we do it on the background
// thread.
int max_node_id = 0;
- BookmarkCodec codec;
+ BookmarkCodec codec(persist_ids_);
TimeTicks start_time = TimeTicks::Now();
codec.Decode(details_->bb_node(), details_->other_folder_node(),
&max_node_id, *root.get());
@@ -125,6 +127,7 @@
MessageLoop* loop_;
scoped_refptr<BookmarkStorage> storage_;
LoadDetails* details_;
+ bool persist_ids_;
DISALLOW_COPY_AND_ASSIGN(LoadTask);
};
@@ -159,7 +162,8 @@
Task* task = new LoadTask(path,
backend_thread() ? MessageLoop::current() : NULL,
this,
- details_.get());
+ details_.get(),
+ model_->PersistIDs());
RunTaskOnBackendThread(task);
}
@@ -205,7 +209,7 @@
}
bool BookmarkStorage::SerializeData(std::string* output) {
- BookmarkCodec codec;
+ BookmarkCodec codec(model_->PersistIDs());
scoped_ptr<Value> value(codec.Encode(model_));
JSONStringValueSerializer serializer(output);
serializer.set_pretty_print(true);
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698