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
3 // found in the LICENSE file.
5 #include "components/gcm_driver/fake_gcm_driver.h"
9 FakeGCMDriver::FakeGCMDriver() {
12 FakeGCMDriver::~FakeGCMDriver() {
15 void FakeGCMDriver::Shutdown() {
18 void FakeGCMDriver::AddAppHandler(
19 const std::string
& app_id
, GCMAppHandler
* handler
) {
22 void FakeGCMDriver::RemoveAppHandler(const std::string
& app_id
) {
25 void FakeGCMDriver::OnSignedIn() {
28 void FakeGCMDriver::Purge() {
31 void FakeGCMDriver::Enable() {
34 void FakeGCMDriver::Disable() {
37 GCMClient
* FakeGCMDriver::GetGCMClientForTesting() const {
41 bool FakeGCMDriver::IsStarted() const {
45 bool FakeGCMDriver::IsConnected() const {
49 void FakeGCMDriver::GetGCMStatistics(const GetGCMStatisticsCallback
& callback
,
53 void FakeGCMDriver::SetGCMRecording(const GetGCMStatisticsCallback
& callback
,
57 GCMClient::Result
FakeGCMDriver::EnsureStarted() {
58 return GCMClient::SUCCESS
;
61 void FakeGCMDriver::RegisterImpl(const std::string
& app_id
,
62 const std::vector
<std::string
>& sender_ids
) {
65 void FakeGCMDriver::UnregisterImpl(const std::string
& app_id
) {
68 void FakeGCMDriver::SendImpl(const std::string
& app_id
,
69 const std::string
& receiver_id
,
70 const GCMClient::OutgoingMessage
& message
) {
73 void FakeGCMDriver::UpdateAccountMapping(
74 const AccountMapping
& account_mapping
) {
77 void FakeGCMDriver::RemoveAccountMapping(const std::string
& account_id
) {