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

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

Issue 215363007: [GCM] Adding basic G-services handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Converting service write to the store to a full replace, adding digest to checkin request, addressi… Created 6 years, 8 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 | Annotate | Revision Log
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const UpdateCallback& callback) OVERRIDE; 67 const UpdateCallback& callback) OVERRIDE;
68 virtual void OverwriteOutgoingMessage(const std::string& persistent_id, 68 virtual void OverwriteOutgoingMessage(const std::string& persistent_id,
69 const MCSMessage& message, 69 const MCSMessage& message,
70 const UpdateCallback& callback) 70 const UpdateCallback& callback)
71 OVERRIDE; 71 OVERRIDE;
72 virtual void RemoveOutgoingMessage(const std::string& persistent_id, 72 virtual void RemoveOutgoingMessage(const std::string& persistent_id,
73 const UpdateCallback& callback) OVERRIDE; 73 const UpdateCallback& callback) OVERRIDE;
74 virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids, 74 virtual void RemoveOutgoingMessages(const PersistentIdList& persistent_ids,
75 const UpdateCallback& callback) OVERRIDE; 75 const UpdateCallback& callback) OVERRIDE;
76 76
77 // GService Settings handling.
78 virtual void UpdateGServicesSettings(
79 const std::map<std::string, std::string>& settings_to_add,
80 const std::string& settings_digest,
81 const base::Time& last_checkin_time,
82 const UpdateCallback& callback) OVERRIDE;
83
77 private: 84 private:
78 typedef std::map<std::string, int> AppIdToMessageCountMap; 85 typedef std::map<std::string, int> AppIdToMessageCountMap;
79 86
80 // Continuation to update the per-app message counts after a load. 87 // Continuation to update the per-app message counts after a load.
81 void LoadContinuation(const LoadCallback& callback, 88 void LoadContinuation(const LoadCallback& callback,
82 scoped_ptr<LoadResult> result); 89 scoped_ptr<LoadResult> result);
83 90
84 // Continuation to update the per-app message counts when adding messages. 91 // Continuation to update the per-app message counts when adding messages.
85 // In particular, if a message fails to add, the message count is decremented. 92 // In particular, if a message fails to add, the message count is decremented.
86 void AddOutgoingMessageContinuation(const UpdateCallback& callback, 93 void AddOutgoingMessageContinuation(const UpdateCallback& callback,
(...skipping 18 matching lines...) Expand all
105 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 112 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
106 113
107 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; 114 base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_;
108 115
109 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); 116 DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl);
110 }; 117 };
111 118
112 } // namespace gcm 119 } // namespace gcm
113 120
114 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_ 121 #endif // GOOGLE_APIS_GCM_ENGINE_GCM_STORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698