Index: chrome/browser/sync/sessions/status_controller.h |
diff --git a/chrome/browser/sync/sessions/status_controller.h b/chrome/browser/sync/sessions/status_controller.h |
index 87d30df33d11e2de13d707b37e79c5623a843b0a..ebb633082852b1769149a61a33d4c029a22a283b 100644 |
--- a/chrome/browser/sync/sessions/status_controller.h |
+++ b/chrome/browser/sync/sessions/status_controller.h |
@@ -151,9 +151,10 @@ class StatusController { |
int64 CountUpdates() const; |
// Returns true iff any of the commit ids added during this session are |
- // bookmark related. |
+ // bookmark related, and the bookmark group restriction is in effect. |
bool HasBookmarkCommitActivity() const { |
- return shared_.commit_set.HasBookmarkCommitId(); |
+ return ActiveGroupRestrictionIncludesModel(syncable::BOOKMARKS) && |
+ shared_.commit_set.HasBookmarkCommitId(); |
} |
// Returns true if the last download_updates_command received a valid |
@@ -178,6 +179,16 @@ class StatusController { |
return group_restriction_; |
} |
+ // Check whether a particular model is included by the active group |
+ // restriction. |
+ bool ActiveGroupRestrictionIncludesModel(syncable::ModelType model) const { |
+ DCHECK(group_restriction_in_effect_); |
+ ModelSafeRoutingInfo::const_iterator it = routing_info_.find(model); |
+ if (it == routing_info_.end()) |
+ return false; |
+ return group_restriction() == it->second; |
+ } |
+ |
// A toolbelt full of methods for updating counters and flags. |
void increment_num_conflicting_commits_by(int value); |
void reset_num_conflicting_commits(); |