Update V8 to version 4.5.91.
[chromium-blink-merge.git] / components / gcm_driver / fake_gcm_driver.cc
blobdfdd91863307b9f53d6b268352f65b3287ff0a79
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"
7 namespace gcm {
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::OnSignedOut() {
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 {
44 return NULL;
47 bool FakeGCMDriver::IsStarted() const {
48 return true;
51 bool FakeGCMDriver::IsConnected() const {
52 return true;
55 void FakeGCMDriver::GetGCMStatistics(const GetGCMStatisticsCallback& callback,
56 bool clear_logs) {
59 void FakeGCMDriver::SetGCMRecording(const GetGCMStatisticsCallback& callback,
60 bool recording) {
63 GCMClient::Result FakeGCMDriver::EnsureStarted(
64 GCMClient::StartMode start_mode) {
65 return GCMClient::SUCCESS;
68 void FakeGCMDriver::RegisterImpl(const std::string& app_id,
69 const std::vector<std::string>& sender_ids) {
72 void FakeGCMDriver::UnregisterImpl(const std::string& app_id) {
75 void FakeGCMDriver::SendImpl(const std::string& app_id,
76 const std::string& receiver_id,
77 const GCMClient::OutgoingMessage& message) {
80 void FakeGCMDriver::SetAccountTokens(
81 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) {
84 void FakeGCMDriver::UpdateAccountMapping(
85 const AccountMapping& account_mapping) {
88 void FakeGCMDriver::RemoveAccountMapping(const std::string& account_id) {
91 base::Time FakeGCMDriver::GetLastTokenFetchTime() {
92 return base::Time();
95 void FakeGCMDriver::SetLastTokenFetchTime(const base::Time& time) {
98 void FakeGCMDriver::WakeFromSuspendForHeartbeat(bool wake) {
101 InstanceIDHandler* FakeGCMDriver::GetInstanceIDHandler() {
102 return NULL;
105 void FakeGCMDriver::AddHeartbeatInterval(const std::string& scope,
106 int interval_ms) {
109 void FakeGCMDriver::RemoveHeartbeatInterval(const std::string& scope) {
112 } // namespace gcm