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

Unified Diff: chrome/browser/chromeos/attestation/attestation_policy_observer.h

Issue 14220003: Finished implementing AttestationPolicyObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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: chrome/browser/chromeos/attestation/attestation_policy_observer.h
diff --git a/chrome/browser/chromeos/attestation/attestation_policy_observer.h b/chrome/browser/chromeos/attestation/attestation_policy_observer.h
index 368ac59775a4320bffd76bf60cd61ff539a68669..c2e316bc5b25b576bde9cecda230f5b3b5a40d89 100644
--- a/chrome/browser/chromeos/attestation/attestation_policy_observer.h
+++ b/chrome/browser/chromeos/attestation/attestation_policy_observer.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/notification_observer.h"
@@ -51,6 +52,9 @@ class AttestationPolicyObserver : public content::NotificationObserver {
private:
static const char kEnterpriseMachineKey[];
Mattias Nissler (ping if slow) 2013/04/23 10:53:01 nit: newline before coment
dkrahn 2013/04/23 21:17:09 Done.
+ // The number of days before a certificate expires during which it is
+ // considered 'expiring soon' and replacement is initiated.
+ static const int kExpiryThresholdInDays;
Mattias Nissler (ping if slow) 2013/04/23 10:53:01 If you're not using these elsewhere, you can just
dkrahn 2013/04/23 21:17:09 Done.
// Checks attestation policy and starts any necessary work.
void Start();
@@ -68,7 +72,18 @@ class AttestationPolicyObserver : public content::NotificationObserver {
void UploadCertificate(const std::string& certificate);
// Checks if a certificate has already been uploaded and, if not, upload.
- void CheckIfUploaded(const std::string& certificate);
+ void CheckIfUploaded(const std::string& certificate,
+ const std::string& key_payload);
+
+ // Gets the payload associated with the EMK and sends it to |callback|.
+ void GetKeyPayload(base::Callback<void(const std::string&)> callback);
+
+ // Called when a certificate upload operation completes. On success, |status|
+ // will be true.
+ void OnUploadComplete(bool status);
+
+ // Marks a key as uploaded in the payload proto.
+ void MarkAsUploaded(const std::string& key_payload);
CrosSettings* cros_settings_;
policy::CloudPolicyClient* policy_client_;

Powered by Google App Engine
This is Rietveld 408576698