| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_SSL_SSL_POLICY_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_POLICY_H_ |
| 6 #define CHROME_BROWSER_SSL_SSL_POLICY_H_ | 6 #define CHROME_BROWSER_SSL_SSL_POLICY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/ssl/ssl_blocking_page.h" | 10 #include "chrome/browser/ssl/ssl_blocking_page.h" |
| 11 #include "chrome/common/filter_policy.h" | 11 #include "chrome/common/filter_policy.h" |
| 12 #include "webkit/glue/resource_type.h" | 12 #include "webkit/glue/resource_type.h" |
| 13 | 13 |
| 14 class NavigationEntry; | 14 class NavigationEntry; |
| 15 class SSLCertErrorHandler; | 15 class SSLCertErrorHandler; |
| 16 class SSLMixedContentHandler; | 16 class SSLMixedContentHandler; |
| 17 class SSLPolicyBackend; | 17 class SSLPolicyBackend; |
| 18 class SSLRequestInfo; | 18 class SSLRequestInfo; |
| 19 | 19 |
| 20 // SSLPolicy | 20 // SSLPolicy |
| 21 // | 21 // |
| 22 // This class is responsible for making the security decisions that concern the | 22 // This class is responsible for making the security decisions that concern the |
| 23 // SSL trust indicators. It relies on the SSLPolicyBackend to actually enact | 23 // SSL trust indicators. It relies on the SSLPolicyBackend to actually enact |
| 24 // the decisions it reaches. | 24 // the decisions it reaches. |
| 25 // | 25 // |
| 26 class SSLPolicy : public SSLBlockingPage::Delegate { | 26 class SSLPolicy : public SSLBlockingPage::Delegate { |
| 27 public: | 27 public: |
| 28 explicit SSLPolicy(SSLPolicyBackend* backend); | 28 explicit SSLPolicy(SSLPolicyBackend* backend); |
| 29 virtual ~SSLPolicy() {} | |
| 30 | 29 |
| 31 // An error occurred with the certificate in an SSL connection. | 30 // An error occurred with the certificate in an SSL connection. |
| 32 void OnCertError(SSLCertErrorHandler* handler); | 31 void OnCertError(SSLCertErrorHandler* handler); |
| 33 | 32 |
| 34 // A request for a mixed-content resource was made. Note that the resource | 33 // A request for a mixed-content resource was made. Note that the resource |
| 35 // request was not started yet and the delegate is responsible for starting | 34 // request was not started yet and the delegate is responsible for starting |
| 36 // it. | 35 // it. |
| 37 void OnMixedContent(SSLMixedContentHandler* handler); | 36 void OnMixedContent(SSLMixedContentHandler* handler); |
| 38 | 37 |
| 39 // We have started a resource request with the given info. | 38 // We have started a resource request with the given info. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // content. Updates our internal state to reflect that we've loaded |info|. | 94 // content. Updates our internal state to reflect that we've loaded |info|. |
| 96 void UpdateStateForUnsafeContent(SSLRequestInfo* info); | 95 void UpdateStateForUnsafeContent(SSLRequestInfo* info); |
| 97 | 96 |
| 98 // The backend we use to enact our decisions. | 97 // The backend we use to enact our decisions. |
| 99 SSLPolicyBackend* backend_; | 98 SSLPolicyBackend* backend_; |
| 100 | 99 |
| 101 DISALLOW_COPY_AND_ASSIGN(SSLPolicy); | 100 DISALLOW_COPY_AND_ASSIGN(SSLPolicy); |
| 102 }; | 101 }; |
| 103 | 102 |
| 104 #endif // CHROME_BROWSER_SSL_SSL_POLICY_H_ | 103 #endif // CHROME_BROWSER_SSL_SSL_POLICY_H_ |
| OLD | NEW |