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

Unified Diff: components/gcm_driver/instance_id/instance_id_impl.h

Issue 1137463003: Support getting and deleting token for Instance ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new files 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 side-by-side diff with in-line comments
Download patch
Index: components/gcm_driver/instance_id/instance_id_impl.h
diff --git a/components/gcm_driver/instance_id/instance_id_impl.h b/components/gcm_driver/instance_id/instance_id_impl.h
index a5124c1430c16148d0c08407e3e992d9ac703f3d..4cb75d3319a4a280dc8a966ddf9ac6dcc0dce0a6 100644
--- a/components/gcm_driver/instance_id/instance_id_impl.h
+++ b/components/gcm_driver/instance_id/instance_id_impl.h
@@ -13,11 +13,13 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
+#include "components/gcm_driver/gcm_client.h"
#include "components/gcm_driver/gcm_delayed_task_controller.h"
#include "components/gcm_driver/instance_id/instance_id.h"
namespace gcm {
class GCMDriver;
+class InstanceIDHandler;
} // namespace gcm
namespace instance_id {
@@ -41,11 +43,27 @@ class InstanceIDImpl : public InstanceID {
void DeleteID(const DeleteIDCallback& callback) override;
private:
+ gcm::InstanceIDHandler* GetInstanceIDHandler() const;
+
void EnsureIDGenerated();
+
+ void OnGetTokenCompleted(const GetTokenCallback& callback,
+ const std::string& token,
+ gcm::GCMClient::Result result);
+ void OnDeleteTokenCompleted(const DeleteTokenCallback& callback,
+ gcm::GCMClient::Result result);
void GetInstanceIDDataCompleted(const std::string& instance_id_data);
void DoGetID(const GetIDCallback& callback);
void DoGetCreationTime(const GetCreationTimeCallback& callback);
+ void DoGetToken(
+ const std::string& authorized_entity,
+ const std::string& scope,
+ const std::map<std::string, std::string>& options,
+ const GetTokenCallback& callback);
+ void DoDeleteToken(const std::string& authorized_entity,
+ const std::string& scope,
+ const DeleteTokenCallback& callback);
// Encodes/decodes the InstanceID data to work with the persistent store.
std::string SerializeAsString() const;

Powered by Google App Engine
This is Rietveld 408576698