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

Side by Side Diff: components/gcm_driver/gcm_client_impl.cc

Issue 327263003: Fix the DCHECK failure when starting and stopping GCMClient immediately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | components/gcm_driver/gcm_client_impl_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/gcm_driver/gcm_client_impl.h" 5 #include "components/gcm_driver/gcm_client_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 // TODO(fgorski): This is one of the signals that store needs a rebuild. 495 // TODO(fgorski): This is one of the signals that store needs a rebuild.
496 DCHECK(success); 496 DCHECK(success);
497 } 497 }
498 498
499 void GCMClientImpl::UpdateRegistrationCallback(bool success) { 499 void GCMClientImpl::UpdateRegistrationCallback(bool success) {
500 // TODO(fgorski): This is one of the signals that store needs a rebuild. 500 // TODO(fgorski): This is one of the signals that store needs a rebuild.
501 DCHECK(success); 501 DCHECK(success);
502 } 502 }
503 503
504 void GCMClientImpl::Stop() { 504 void GCMClientImpl::Stop() {
505 weak_ptr_factory_.InvalidateWeakPtrs();
505 device_checkin_info_.Reset(); 506 device_checkin_info_.Reset();
506 connection_factory_.reset(); 507 connection_factory_.reset();
507 mcs_client_.reset(); 508 mcs_client_.reset();
508 checkin_request_.reset(); 509 checkin_request_.reset();
509 pending_registration_requests_.clear(); 510 pending_registration_requests_.clear();
510 state_ = INITIALIZED; 511 state_ = INITIALIZED;
511 gcm_store_->Close(); 512 gcm_store_->Close();
512 } 513 }
513 514
514 void GCMClientImpl::CheckOut() { 515 void GCMClientImpl::CheckOut() {
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 869
869 recorder_.RecordIncomingSendError( 870 recorder_.RecordIncomingSendError(
870 data_message_stanza.category(), 871 data_message_stanza.category(),
871 data_message_stanza.to(), 872 data_message_stanza.to(),
872 data_message_stanza.id()); 873 data_message_stanza.id());
873 delegate_->OnMessageSendError(data_message_stanza.category(), 874 delegate_->OnMessageSendError(data_message_stanza.category(),
874 send_error_details); 875 send_error_details);
875 } 876 }
876 877
877 } // namespace gcm 878 } // namespace gcm
OLDNEW
« no previous file with comments | « no previous file | components/gcm_driver/gcm_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698