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

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

Issue 1126233004: Persist Instance ID data to GCM store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac 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 | « google_apis/gcm/engine/gcm_store.cc ('k') | google_apis/gcm/engine/gcm_store_impl.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 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 98 // Sets the custom client heartbeat interval for the scope.
99 void AddHeartbeatInterval(const std::string& scope, 99 void AddHeartbeatInterval(const std::string& scope,
100 int interval_ms, 100 int interval_ms,
101 const UpdateCallback& callback) override; 101 const UpdateCallback& callback) override;
102 void RemoveHeartbeatInterval(const std::string& scope, 102 void RemoveHeartbeatInterval(const std::string& scope,
103 const UpdateCallback& callback) override; 103 const UpdateCallback& callback) override;
104 104
105 // Instance ID data.
106 void AddInstanceIDData(const std::string& app_id,
107 const std::string& instance_id_data,
108 const UpdateCallback& callback) override;
109 void RemoveInstanceIDData(const std::string& app_id,
110 const UpdateCallback& callback) override;
111
105 // Injects a value to database. Only to be used for testing. 112 // Injects a value to database. Only to be used for testing.
106 void SetValueForTesting(const std::string& key, 113 void SetValueForTesting(const std::string& key,
107 const std::string& value, 114 const std::string& value,
108 const UpdateCallback& callback); 115 const UpdateCallback& callback);
109 116
110 private: 117 private:
111 typedef std::map<std::string, int> AppIdToMessageCountMap; 118 typedef std::map<std::string, int> AppIdToMessageCountMap;
112 119
113 // Continuation to update the per-app message counts after a load. 120 // Continuation to update the per-app message counts after a load.
114 void LoadContinuation(const LoadCallback& callback, 121 void LoadContinuation(const LoadCallback& callback,
(...skipping 23 matching lines...) Expand all
138 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 145 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
139 146
140 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; 147 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_;
141 148
142 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); 149 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl);
143 }; 150 };
144 151
145 } // namespace gcm 152 } // namespace gcm
146 153
147 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ 154 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/gcm_store.cc ('k') | google_apis/gcm/engine/gcm_store_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698