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

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

Issue 1124783002: [GCM] Wiring heartbeat interval calls to GCMDriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@store-heartbeat-gcm
Patch Set: Addressing final feedback and fixing formatting Created 5 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
« no previous file with comments | « no previous file | components/gcm_driver/fake_gcm_client.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 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 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_H_
6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_H_ 6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "components/gcm_driver/gcm_client.h" 10 #include "components/gcm_driver/gcm_client.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void SetAccountTokens( 53 void SetAccountTokens(
54 const std::vector<AccountTokenInfo>& account_tokens) override; 54 const std::vector<AccountTokenInfo>& account_tokens) override;
55 void UpdateAccountMapping(const AccountMapping& account_mapping) override; 55 void UpdateAccountMapping(const AccountMapping& account_mapping) override;
56 void RemoveAccountMapping(const std::string& account_id) override; 56 void RemoveAccountMapping(const std::string& account_id) override;
57 void SetLastTokenFetchTime(const base::Time& time) override; 57 void SetLastTokenFetchTime(const base::Time& time) override;
58 void UpdateHeartbeatTimer(scoped_ptr<base::Timer> timer) override; 58 void UpdateHeartbeatTimer(scoped_ptr<base::Timer> timer) override;
59 void AddInstanceIDData(const std::string& app_id, 59 void AddInstanceIDData(const std::string& app_id,
60 const std::string& instance_id_data) override; 60 const std::string& instance_id_data) override;
61 void RemoveInstanceIDData(const std::string& app_id) override; 61 void RemoveInstanceIDData(const std::string& app_id) override;
62 std::string GetInstanceIDData(const std::string& app_id) override; 62 std::string GetInstanceIDData(const std::string& app_id) override;
63 void AddHeartbeatInterval(const std::string& scope, int interval_ms) override;
64 void RemoveHeartbeatInterval(const std::string& scope) override;
63 65
64 // Initiate the start that has been delayed. 66 // Initiate the start that has been delayed.
65 // Called on UI thread. 67 // Called on UI thread.
66 void PerformDelayedStart(); 68 void PerformDelayedStart();
67 69
68 // Simulate receiving something from the server. 70 // Simulate receiving something from the server.
69 // Called on UI thread. 71 // Called on UI thread.
70 void ReceiveMessage(const std::string& app_id, 72 void ReceiveMessage(const std::string& app_id,
71 const IncomingMessage& message); 73 const IncomingMessage& message);
72 void DeleteMessages(const std::string& app_id); 74 void DeleteMessages(const std::string& app_id);
(...skipping 28 matching lines...) Expand all
101 scoped_refptr<base::SequencedTaskRunner> ui_thread_; 103 scoped_refptr<base::SequencedTaskRunner> ui_thread_;
102 scoped_refptr<base::SequencedTaskRunner> io_thread_; 104 scoped_refptr<base::SequencedTaskRunner> io_thread_;
103 base::WeakPtrFactory<FakeGCMClient> weak_ptr_factory_; 105 base::WeakPtrFactory<FakeGCMClient> weak_ptr_factory_;
104 106
105 DISALLOW_COPY_AND_ASSIGN(FakeGCMClient); 107 DISALLOW_COPY_AND_ASSIGN(FakeGCMClient);
106 }; 108 };
107 109
108 } // namespace gcm 110 } // namespace gcm
109 111
110 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_H_ 112 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | components/gcm_driver/fake_gcm_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698