| Index: chrome/browser/chromeos/attestation/platform_verification_flow.h
|
| diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow.h b/chrome/browser/chromeos/attestation/platform_verification_flow.h
|
| index 3d3b0aaa946cf245ff26b5e2722c0fb7aa2cb8d1..c3b07637357bfd12d55e51e5c185a9643f51a829 100644
|
| --- a/chrome/browser/chromeos/attestation/platform_verification_flow.h
|
| +++ b/chrome/browser/chromeos/attestation/platform_verification_flow.h
|
| @@ -74,30 +74,12 @@ class PlatformVerificationFlow
|
| TIMEOUT, // The operation timed out.
|
| };
|
|
|
| - enum ConsentResponse {
|
| - CONSENT_RESPONSE_NONE,
|
| - CONSENT_RESPONSE_ALLOW,
|
| - CONSENT_RESPONSE_DENY,
|
| - };
|
| -
|
| // An interface which allows settings and UI to be abstracted for testing
|
| // purposes. For normal operation the default implementation should be used.
|
| class Delegate {
|
| public:
|
| virtual ~Delegate() {}
|
|
|
| - // This callback will be called when a user has given a |response| to a
|
| - // consent request of the specified |type|.
|
| - typedef base::Callback<void(ConsentResponse response)> ConsentCallback;
|
| -
|
| - // Invokes consent UI within the context of |web_contents| and calls
|
| - // |callback| when the user responds.
|
| - // |requesting_origin| or the extension/app name will be shown on the prompt
|
| - // if the request comes from a web page or an extension/app, respectively.
|
| - virtual void ShowConsentPrompt(content::WebContents* web_contents,
|
| - const GURL& requesting_origin,
|
| - const ConsentCallback& callback) = 0;
|
| -
|
| // Gets prefs associated with the given |web_contents|. If no prefs are
|
| // associated with |web_contents| then NULL is returned.
|
| virtual PrefService* GetPrefs(content::WebContents* web_contents) = 0;
|
| @@ -189,24 +171,8 @@ class PlatformVerificationFlow
|
| // arguments to ChallengePlatformKey are in |context| and
|
| // |attestation_prepared| specifies whether attestation has been prepared on
|
| // this device.
|
| - void CheckEnrollment(const ChallengeContext& context,
|
| - bool attestation_prepared);
|
| -
|
| - // Checks whether we need to prompt the user for consent before proceeding and
|
| - // invokes the consent UI if so. The arguments to ChallengePlatformKey are
|
| - // in |context| and |attestation_enrolled| specifies whether attestation has
|
| - // been enrolled for this device.
|
| - void CheckConsent(const ChallengeContext& context,
|
| - bool attestation_enrolled);
|
| -
|
| - // A callback called when the user has given their consent response. The
|
| - // arguments to ChallengePlatformKey are in |context|. |consent_required| and
|
| - // |consent_response| indicate whether consent was required and user response,
|
| - // respectively. If the response indicates that the operation should proceed,
|
| - // this method invokes a certificate request.
|
| - void OnConsentResponse(const ChallengeContext& context,
|
| - bool consent_required,
|
| - ConsentResponse consent_response);
|
| + void OnAttestationPrepared(const ChallengeContext& context,
|
| + bool attestation_prepared);
|
|
|
| // Initiates the flow to get a platform key certificate. The arguments to
|
| // ChallengePlatformKey are in |context|. |user_id| identifies the user for
|
| @@ -248,14 +214,11 @@ class PlatformVerificationFlow
|
| bool operation_success,
|
| const std::string& response_data);
|
|
|
| - // Checks whether policy or profile settings associated with |web_contents|
|
| - // have attestation for content protection explicitly disabled.
|
| - bool IsAttestationEnabled(content::WebContents* web_contents);
|
| + // Checks whether attestation for content protection is allowed by policy.
|
| + bool IsAttestationAllowedByPolicy();
|
|
|
| - // Updates user settings for the profile associated with |web_contents| based
|
| - // on the |consent_response| to the request of type |consent_type|.
|
| - bool UpdateSettings(content::WebContents* web_contents,
|
| - ConsentResponse consent_response);
|
| + // Checks whether attestation is permitted by user.
|
| + bool IsPermittedByUser(content::WebContents* web_contents);
|
|
|
| // Finds the origin-specific consent pref in |content_settings| for |url|. If
|
| // a pref exists for the origin, returns true and sets |pref_value| if it is
|
| @@ -264,12 +227,6 @@ class PlatformVerificationFlow
|
| const GURL& url,
|
| bool* pref_value);
|
|
|
| - // Records the origin-specific consent pref in |content_settings| for |url|.
|
| - // The pref will be set to |allow_origin|.
|
| - void RecordOriginConsent(HostContentSettingsMap* content_settings,
|
| - const GURL& url,
|
| - bool allow_origin);
|
| -
|
| // Returns true iff |certificate| is an expired X.509 certificate.
|
| bool IsExpired(const std::string& certificate);
|
|
|
|
|