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

Side by Side Diff: google_apis/gcm/engine/gcm_store_impl.h

Issue 1121003003: [GCM] Adding handling of heartbeat intervals to the GCM store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@heartbeat-gcm
Patch Set: Adding histrograms 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
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 GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_
6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Sets the account information related to device to account mapping. 88 // Sets the account information related to device to account mapping.
89 void AddAccountMapping(const AccountMapping& account_mapping, 89 void AddAccountMapping(const AccountMapping& account_mapping,
90 const UpdateCallback& callback) override; 90 const UpdateCallback& callback) override;
91 void RemoveAccountMapping(const std::string& account_id, 91 void RemoveAccountMapping(const std::string& account_id,
92 const UpdateCallback& callback) override; 92 const UpdateCallback& callback) override;
93 93
94 // Sets last token fetch time. 94 // Sets last token fetch time.
95 void SetLastTokenFetchTime(const base::Time& time, 95 void SetLastTokenFetchTime(const base::Time& time,
96 const UpdateCallback& callback) override; 96 const UpdateCallback& callback) override;
97 97
98 // Sets the custom client heartbeat interval for the scope.
99 void AddHeartbeatInterval(const std::string& scope,
100 int interval_ms,
101 const UpdateCallback& callback) override;
102 void RemoveHeartbeatInterval(const std::string& scope,
103 const UpdateCallback& callback) override;
104
98 // Injects a value to database. Only to be used for testing. 105 // Injects a value to database. Only to be used for testing.
99 void SetValueForTesting(const std::string& key, 106 void SetValueForTesting(const std::string& key,
100 const std::string& value, 107 const std::string& value,
101 const UpdateCallback& callback); 108 const UpdateCallback& callback);
102 109
103 private: 110 private:
104 typedef std::map<std::string, int> AppIdToMessageCountMap; 111 typedef std::map<std::string, int> AppIdToMessageCountMap;
105 112
106 // Continuation to update the per-app message counts after a load. 113 // Continuation to update the per-app message counts after a load.
107 void LoadContinuation(const LoadCallback& callback, 114 void LoadContinuation(const LoadCallback& callback,
(...skipping 23 matching lines...) Expand all
131 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 138 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
132 139
133 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; 140 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_;
134 141
135 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); 142 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl);
136 }; 143 };
137 144
138 } // namespace gcm 145 } // namespace gcm
139 146
140 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ 147 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698