summaryrefslogtreecommitdiffstats
path: root/components/gcm_driver/instance_id/instance_id_impl.h
diff options
context:
space:
mode:
authorjianli <jianli@chromium.org>2015-05-05 17:24:34 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 00:26:14 +0000
commit2104ce61878e278ae5e13fb5fc5bb2cb4c9e528f (patch)
treed392d55bc35806c765e9353dc6a964f690f38855 /components/gcm_driver/instance_id/instance_id_impl.h
parent8c214f63c675d641c31053ebd1c56688e774f557 (diff)
downloadchromium_src-2104ce61878e278ae5e13fb5fc5bb2cb4c9e528f.zip
chromium_src-2104ce61878e278ae5e13fb5fc5bb2cb4c9e528f.tar.gz
chromium_src-2104ce61878e278ae5e13fb5fc5bb2cb4c9e528f.tar.bz2
Pass GCMDriver instance to InstanceID.
InstanceID implementation depends on certain GCMDriver functionalities. BUG=477084 TEST=none Review URL: https://codereview.chromium.org/1118123002 Cr-Commit-Position: refs/heads/master@{#328448}
Diffstat (limited to 'components/gcm_driver/instance_id/instance_id_impl.h')
-rw-r--r--components/gcm_driver/instance_id/instance_id_impl.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/gcm_driver/instance_id/instance_id_impl.h b/components/gcm_driver/instance_id/instance_id_impl.h
index 2cdf742..dd7b775 100644
--- a/components/gcm_driver/instance_id/instance_id_impl.h
+++ b/components/gcm_driver/instance_id/instance_id_impl.h
@@ -14,12 +14,16 @@
#include "base/time/time.h"
#include "components/gcm_driver/instance_id/instance_id.h"
+namespace gcm {
+class GCMDriver;
+} // namespace gcm
+
namespace instance_id {
// InstanceID implementation for desktop and iOS.
class InstanceIDImpl : public InstanceID {
public:
- explicit InstanceIDImpl(const std::string& app_id);
+ InstanceIDImpl(const std::string& app_id, gcm::GCMDriver* gcm_driver);
~InstanceIDImpl() override;
// InstanceID:
@@ -35,6 +39,8 @@ class InstanceIDImpl : public InstanceID {
void DeleteID(const DeleteIDCallback& callback) override;
private:
+ gcm::GCMDriver* gcm_driver_; // Not owned.
+
void EnsureIDGenerated();
// The generated Instance ID.