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

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

Issue 445683003: [GCM] Exposing persistence of account mappings in GCM Driver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updates based on self review Created 6 years, 4 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
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/fake_gcm_client.h" 5 #include "components/gcm_driver/fake_gcm_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 GCMClient::GCMStatistics FakeGCMClient::GetStatistics() const { 114 GCMClient::GCMStatistics FakeGCMClient::GetStatistics() const {
115 return GCMClient::GCMStatistics(); 115 return GCMClient::GCMStatistics();
116 } 116 }
117 117
118 void FakeGCMClient::SetAccountsForCheckin( 118 void FakeGCMClient::SetAccountsForCheckin(
119 const std::map<std::string, std::string>& account_tokens) { 119 const std::map<std::string, std::string>& account_tokens) {
120 } 120 }
121 121
122 void FakeGCMClient::UpdateAccountMapping(
123 const AccountMapping& account_mapping) {
124 }
125
126 void FakeGCMClient::RemoveAccountMapping(const std::string& account_id) {
127 }
128
122 void FakeGCMClient::PerformDelayedLoading() { 129 void FakeGCMClient::PerformDelayedLoading() {
123 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); 130 DCHECK(ui_thread_->RunsTasksOnCurrentThread());
124 131
125 io_thread_->PostTask( 132 io_thread_->PostTask(
126 FROM_HERE, 133 FROM_HERE,
127 base::Bind(&FakeGCMClient::DoLoading, weak_ptr_factory_.GetWeakPtr())); 134 base::Bind(&FakeGCMClient::DoLoading, weak_ptr_factory_.GetWeakPtr()));
128 } 135 }
129 136
130 void FakeGCMClient::ReceiveMessage(const std::string& app_id, 137 void FakeGCMClient::ReceiveMessage(const std::string& app_id,
131 const IncomingMessage& message) { 138 const IncomingMessage& message) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 delegate_->OnMessageSendError(app_id, send_error_details); 240 delegate_->OnMessageSendError(app_id, send_error_details);
234 } 241 }
235 242
236 void FakeGCMClient::SendAcknowledgement(const std::string& app_id, 243 void FakeGCMClient::SendAcknowledgement(const std::string& app_id,
237 const std::string& message_id) { 244 const std::string& message_id) {
238 if (delegate_) 245 if (delegate_)
239 delegate_->OnSendAcknowledged(app_id, message_id); 246 delegate_->OnSendAcknowledged(app_id, message_id);
240 } 247 }
241 248
242 } // namespace gcm 249 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698