OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 250 |
251 // Checks whether policy or profile settings associated with |web_contents| | 251 // Checks whether policy or profile settings associated with |web_contents| |
252 // have attestation for content protection explicitly disabled. | 252 // have attestation for content protection explicitly disabled. |
253 bool IsAttestationEnabled(content::WebContents* web_contents); | 253 bool IsAttestationEnabled(content::WebContents* web_contents); |
254 | 254 |
255 // Updates user settings for the profile associated with |web_contents| based | 255 // Updates user settings for the profile associated with |web_contents| based |
256 // on the |consent_response| to the request of type |consent_type|. | 256 // on the |consent_response| to the request of type |consent_type|. |
257 bool UpdateSettings(content::WebContents* web_contents, | 257 bool UpdateSettings(content::WebContents* web_contents, |
258 ConsentResponse consent_response); | 258 ConsentResponse consent_response); |
259 | 259 |
260 // Finds the domain-specific consent pref in |content_settings| for |url|. If | 260 // Finds the origin-specific consent pref in |content_settings| for |url|. If |
261 // a pref exists for the domain, returns true and sets |pref_value| if it is | 261 // a pref exists for the origin, returns true and sets |pref_value| if it is |
262 // not NULL. | 262 // not NULL. |
263 bool GetDomainPref(HostContentSettingsMap* content_settings, | 263 bool GetOriginPref(HostContentSettingsMap* content_settings, |
264 const GURL& url, | 264 const GURL& url, |
265 bool* pref_value); | 265 bool* pref_value); |
266 | 266 |
267 // Records the domain-specific consent pref in |content_settings| for |url|. | 267 // Records the origin-specific consent pref in |content_settings| for |url|. |
268 // The pref will be set to |allow_domain|. | 268 // The pref will be set to |allow_origin|. |
269 void RecordDomainConsent(HostContentSettingsMap* content_settings, | 269 void RecordOriginConsent(HostContentSettingsMap* content_settings, |
270 const GURL& url, | 270 const GURL& url, |
271 bool allow_domain); | 271 bool allow_origin); |
272 | 272 |
273 // Returns true iff |certificate| is an expired X.509 certificate. | 273 // Returns true iff |certificate| is an expired X.509 certificate. |
274 bool IsExpired(const std::string& certificate); | 274 bool IsExpired(const std::string& certificate); |
275 | 275 |
276 AttestationFlow* attestation_flow_; | 276 AttestationFlow* attestation_flow_; |
277 scoped_ptr<AttestationFlow> default_attestation_flow_; | 277 scoped_ptr<AttestationFlow> default_attestation_flow_; |
278 cryptohome::AsyncMethodCaller* async_caller_; | 278 cryptohome::AsyncMethodCaller* async_caller_; |
279 CryptohomeClient* cryptohome_client_; | 279 CryptohomeClient* cryptohome_client_; |
280 Delegate* delegate_; | 280 Delegate* delegate_; |
281 scoped_ptr<Delegate> default_delegate_; | 281 scoped_ptr<Delegate> default_delegate_; |
282 base::TimeDelta timeout_delay_; | 282 base::TimeDelta timeout_delay_; |
283 | 283 |
284 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationFlow); | 284 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationFlow); |
285 }; | 285 }; |
286 | 286 |
287 } // namespace attestation | 287 } // namespace attestation |
288 } // namespace chromeos | 288 } // namespace chromeos |
289 | 289 |
290 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ | 290 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ |
OLD | NEW |