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

Side by Side Diff: google_apis/gcm/gcm_client_impl.cc

Issue 285623002: Rename GCMClient::Load to GCMClient::Start (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 6 years, 7 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 | « google_apis/gcm/gcm_client_impl.h ('k') | google_apis/gcm/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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "google_apis/gcm/gcm_client_impl.h" 5 #include "google_apis/gcm/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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 gcm_store_.reset(new GCMStoreImpl(path, blocking_task_runner)); 224 gcm_store_.reset(new GCMStoreImpl(path, blocking_task_runner));
225 225
226 delegate_ = delegate; 226 delegate_ = delegate;
227 227
228 recorder_.SetDelegate(this); 228 recorder_.SetDelegate(this);
229 229
230 state_ = INITIALIZED; 230 state_ = INITIALIZED;
231 } 231 }
232 232
233 void GCMClientImpl::Load() { 233 void GCMClientImpl::Start() {
234 DCHECK_EQ(INITIALIZED, state_); 234 DCHECK_EQ(INITIALIZED, state_);
235 235
236 // Once the loading is completed, the check-in will be initiated. 236 // Once the loading is completed, the check-in will be initiated.
237 gcm_store_->Load(base::Bind(&GCMClientImpl::OnLoadCompleted, 237 gcm_store_->Load(base::Bind(&GCMClientImpl::OnLoadCompleted,
238 weak_ptr_factory_.GetWeakPtr())); 238 weak_ptr_factory_.GetWeakPtr()));
239 state_ = LOADING; 239 state_ = LOADING;
240 } 240 }
241 241
242 void GCMClientImpl::OnLoadCompleted(scoped_ptr<GCMStore::LoadResult> result) { 242 void GCMClientImpl::OnLoadCompleted(scoped_ptr<GCMStore::LoadResult> result) {
243 DCHECK_EQ(LOADING, state_); 243 DCHECK_EQ(LOADING, state_);
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 802
803 recorder_.RecordIncomingSendError( 803 recorder_.RecordIncomingSendError(
804 data_message_stanza.category(), 804 data_message_stanza.category(),
805 data_message_stanza.to(), 805 data_message_stanza.to(),
806 data_message_stanza.id()); 806 data_message_stanza.id());
807 delegate_->OnMessageSendError(data_message_stanza.category(), 807 delegate_->OnMessageSendError(data_message_stanza.category(),
808 send_error_details); 808 send_error_details);
809 } 809 }
810 810
811 } // namespace gcm 811 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/gcm_client_impl.h ('k') | google_apis/gcm/gcm_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698