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::AddConnectionObserver(GCMConnectionObserver
* observer
) {
34 void FakeGCMDriver::RemoveConnectionObserver(GCMConnectionObserver
* observer
) {
37 void FakeGCMDriver::Enable() {
40 void FakeGCMDriver::Disable() {
43 GCMClient
* FakeGCMDriver::GetGCMClientForTesting() const {
47 bool FakeGCMDriver::IsStarted() const {
51 bool FakeGCMDriver::IsConnected() const {
55 void FakeGCMDriver::GetGCMStatistics(const GetGCMStatisticsCallback
& callback
,
59 void FakeGCMDriver::SetGCMRecording(const GetGCMStatisticsCallback
& callback
,
63 GCMClient::Result
FakeGCMDriver::EnsureStarted() {
64 return GCMClient::SUCCESS
;
67 void FakeGCMDriver::RegisterImpl(const std::string
& app_id
,
68 const std::vector
<std::string
>& sender_ids
) {
71 void FakeGCMDriver::UnregisterImpl(const std::string
& app_id
) {
74 void FakeGCMDriver::SendImpl(const std::string
& app_id
,
75 const std::string
& receiver_id
,
76 const GCMClient::OutgoingMessage
& message
) {
79 void FakeGCMDriver::UpdateAccountMapping(
80 const AccountMapping
& account_mapping
) {
83 void FakeGCMDriver::RemoveAccountMapping(const std::string
& account_id
) {