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

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

Issue 1113213002: Generate Instance ID locally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove leftover code Created 5 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 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 9855500bf0773f98d21812c197bebd031b22ddfc..be7b9fc9e8aae5167a9b794aa27b77aa30ac9e47 100644
--- a/components/gcm_driver/instance_id/instance_id_impl.h
+++ b/components/gcm_driver/instance_id/instance_id_impl.h
@@ -10,9 +10,14 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "components/gcm_driver/instance_id/instance_id.h"
+namespace crypto {
+class RSAPrivateKey;
+} // namespace crypto
+
namespace instance_id {
// InstanceID implementation for desktop and iOS.
@@ -34,6 +39,17 @@ class InstanceIDImpl : public InstanceID {
void DeleteID(const DeleteIDCallback& callback) override;
private:
+ void EnsureIDGenerated();
+
+ // The Instance ID is based on the public/private key pair.
+ scoped_ptr<crypto::RSAPrivateKey> key_pair_;
fgorski 2015/04/30 22:13:12 do we need to keep the key_pair_ around? what for?
jianli 2015/05/02 00:30:18 Not needed any more.
+
+ // The generated Instance ID.
+ std::string id_;
+
+ // The time when the Instance ID has been generated.
+ base::Time creation_time_;
+
DISALLOW_COPY_AND_ASSIGN(InstanceIDImpl);
};

Powered by Google App Engine
This is Rietveld 408576698