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

Unified Diff: sync/notifier/chrome_invalidation_client.cc

Issue 10828116: Merge 148907 - [Sync] Fix race condition with notification startup (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/chrome_invalidation_client.cc
===================================================================
--- sync/notifier/chrome_invalidation_client.cc (revision 149442)
+++ sync/notifier/chrome_invalidation_client.cc (working copy)
@@ -105,7 +105,10 @@
void ChromeInvalidationClient::RegisterTypes(syncable::ModelTypeSet types) {
DCHECK(CalledOnValidThread());
registered_types_ = types;
- if (GetState() == NO_NOTIFICATION_ERROR && registration_manager_.get()) {
+ // |ticl_state_| can go to NO_NOTIFICATION_ERROR even without a
+ // working XMPP connection (as observed by us), so check it instead
+ // of GetState() (see http://crbug.com/139424).
+ if (ticl_state_ == NO_NOTIFICATION_ERROR && registration_manager_.get()) {
registration_manager_->SetRegisteredTypes(registered_types_);
}
// TODO(akalin): Clear invalidation versions for unregistered types.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698