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

Side by Side Diff: chrome/browser/sync/notifier/server_notifier_thread.cc

Issue 5712005: Merge 68891 - [Sync] Fixed sync crash regression in ServerNotifierThread (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/notifier/server_notifier_thread_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/notifier/server_notifier_thread.h" 5 #include "chrome/browser/sync/notifier/server_notifier_thread.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // generated from our own changes. 116 // generated from our own changes.
117 const std::string kClientId = "server_notifier_thread"; 117 const std::string kClientId = "server_notifier_thread";
118 chrome_invalidation_client_->Start( 118 chrome_invalidation_client_->Start(
119 kClientId, state_, this, this, base_task_); 119 kClientId, state_, this, this, base_task_);
120 state_.clear(); 120 state_.clear();
121 } 121 }
122 } 122 }
123 123
124 void ServerNotifierThread::RegisterTypesAndSignalSubscribed() { 124 void ServerNotifierThread::RegisterTypesAndSignalSubscribed() {
125 DCHECK_EQ(MessageLoop::current(), worker_message_loop()); 125 DCHECK_EQ(MessageLoop::current(), worker_message_loop());
126 DCHECK(chrome_invalidation_client_.get()); 126 if (!chrome_invalidation_client_.get()) {
127 return;
128 }
127 chrome_invalidation_client_->RegisterTypes(); 129 chrome_invalidation_client_->RegisterTypes();
128 observers_->Notify(&Observer::OnSubscriptionStateChange, true); 130 observers_->Notify(&Observer::OnSubscriptionStateChange, true);
129 } 131 }
130 132
131 void ServerNotifierThread::StopInvalidationListener() { 133 void ServerNotifierThread::StopInvalidationListener() {
132 DCHECK_EQ(MessageLoop::current(), worker_message_loop()); 134 DCHECK_EQ(MessageLoop::current(), worker_message_loop());
133 chrome_invalidation_client_.reset(); 135 chrome_invalidation_client_.reset();
134 } 136 }
135 137
136 } // namespace sync_notifier 138 } // namespace sync_notifier
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/notifier/server_notifier_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698