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

Unified Diff: chrome/browser/sync/glue/bookmark_model_associator.cc

Issue 8786006: Changes the visibility of the 'mobile' node based on whether (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/sync/glue/bookmark_model_associator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/bookmark_model_associator.cc
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index a010fadbfaea0412881632a55154c3379e131384..969d3c91c73b89f7d94c27c612867a77d8e35af7 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -186,6 +186,16 @@ BookmarkModelAssociator::~BookmarkModelAssociator() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
+void BookmarkModelAssociator::UpdateMobileNodeVisibility() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (!bookmark_model_->IsLoaded())
akalin 2011/12/03 00:17:05 hmm does the visibility get updated eventually whe
sky 2011/12/03 00:23:07 I would assume Associate is run at that point. But
Yaron 2011/12/05 18:40:12 Hmm. It looks like BookmarkChangeProcessor::Loaded
+ return;
+
+ int64 mobile_bookmarks_sync_id;
+ bookmark_model_->SetMobileFolderVisible(
+ GetSyncIdForTaggedNode(kMobileBookmarksTag, &mobile_bookmarks_sync_id));
+}
+
bool BookmarkModelAssociator::DisassociateModels(SyncError* error) {
id_map_.clear();
id_map_inverse_.clear();
@@ -228,6 +238,7 @@ void BookmarkModelAssociator::Associate(const BookmarkNode* node,
id_map_inverse_[sync_id] = node;
dirty_associations_sync_ids_.insert(sync_id);
PostPersistAssociationsTask();
+ UpdateMobileNodeVisibility();
}
void BookmarkModelAssociator::Disassociate(int64 sync_id) {
« no previous file with comments | « chrome/browser/sync/glue/bookmark_model_associator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698