summaryrefslogtreecommitdiffstats
path: root/components/gcm_driver/instance_id/instance_id_impl.h
diff options
context:
space:
mode:
authorjianli <jianli@chromium.org>2015-04-29 14:55:34 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-29 21:57:23 +0000
commit408900326adb348e1c6b464439d1e2c3631cf21e (patch)
tree303205a83a2ca4166b833fcc32f761b690b0d933 /components/gcm_driver/instance_id/instance_id_impl.h
parent04ae4f5ca488a6066efef98fd60d58f7f71040aa (diff)
downloadchromium_src-408900326adb348e1c6b464439d1e2c3631cf21e.zip
chromium_src-408900326adb348e1c6b464439d1e2c3631cf21e.tar.gz
chromium_src-408900326adb348e1c6b464439d1e2c3631cf21e.tar.bz2
Add InstanceIDDriver and InstanceID.
They are used for Instance ID service. Not implemented yet. BUG=477084 TEST=none Review URL: https://codereview.chromium.org/1102963004 Cr-Commit-Position: refs/heads/master@{#327589}
Diffstat (limited to 'components/gcm_driver/instance_id/instance_id_impl.h')
-rw-r--r--components/gcm_driver/instance_id/instance_id_impl.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/components/gcm_driver/instance_id/instance_id_impl.h b/components/gcm_driver/instance_id/instance_id_impl.h
new file mode 100644
index 0000000..9855500
--- /dev/null
+++ b/components/gcm_driver/instance_id/instance_id_impl.h
@@ -0,0 +1,42 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_IMPL_H_
+#define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_IMPL_H_
+
+#include <map>
+#include <string>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "base/time/time.h"
+#include "components/gcm_driver/instance_id/instance_id.h"
+
+namespace instance_id {
+
+// InstanceID implementation for desktop and iOS.
+class InstanceIDImpl : public InstanceID {
+ public:
+ explicit InstanceIDImpl(const std::string& app_id);
+ ~InstanceIDImpl() override;
+
+ // InstanceID:
+ std::string GetID() override;
+ base::Time GetCreationTime() override;
+ void GetToken(const std::string& audience,
+ const std::string& scope,
+ const std::map<std::string, std::string>& options,
+ const GetTokenCallback& callback) override;
+ void DeleteToken(const std::string& audience,
+ const std::string& scope,
+ const DeleteTokenCallback& callback) override;
+ void DeleteID(const DeleteIDCallback& callback) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(InstanceIDImpl);
+};
+
+} // namespace instance_id
+
+#endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_IMPL_H_