| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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 | 29 |
| 30 // An error occurred with the certificate in an SSL connection. | 30 // An error occurred with the certificate in an SSL connection. |
| 31 void OnCertError(SSLCertErrorHandler* handler); | 31 void OnCertError(SSLCertErrorHandler* handler); |
| 32 | 32 |
| 33 // TODO(abarth) Remove this API once the new mixed content path is done. |
| 34 // |
| 33 // A request for a mixed-content resource was made. Note that the resource | 35 // A request for a mixed-content resource was made. Note that the resource |
| 34 // request was not started yet and the delegate is responsible for starting | 36 // request was not started yet and the delegate is responsible for starting |
| 35 // it. | 37 // it. |
| 36 void OnMixedContent(SSLMixedContentHandler* handler); | 38 void OnMixedContent(SSLMixedContentHandler* handler); |
| 37 | 39 |
| 40 void DidDisplayInsecureContent(NavigationEntry* entry); |
| 41 void DidRunInsecureContent(const std::string& security_origin); |
| 42 |
| 38 // We have started a resource request with the given info. | 43 // We have started a resource request with the given info. |
| 39 void OnRequestStarted(SSLRequestInfo* info); | 44 void OnRequestStarted(SSLRequestInfo* info); |
| 40 | 45 |
| 41 // Update the SSL information in |entry| to match the current state. | 46 // Update the SSL information in |entry| to match the current state. |
| 42 void UpdateEntry(NavigationEntry* entry); | 47 void UpdateEntry(NavigationEntry* entry); |
| 43 | 48 |
| 44 // This method is static because it is called from both the UI and the IO | 49 // This method is static because it is called from both the UI and the IO |
| 45 // threads. | 50 // threads. |
| 46 static bool IsMixedContent(const GURL& url, | 51 static bool IsMixedContent(const GURL& url, |
| 47 ResourceType::Type resource_type, | 52 ResourceType::Type resource_type, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // content. Updates our internal state to reflect that we've loaded |info|. | 99 // content. Updates our internal state to reflect that we've loaded |info|. |
| 95 void UpdateStateForUnsafeContent(SSLRequestInfo* info); | 100 void UpdateStateForUnsafeContent(SSLRequestInfo* info); |
| 96 | 101 |
| 97 // The backend we use to enact our decisions. | 102 // The backend we use to enact our decisions. |
| 98 SSLPolicyBackend* backend_; | 103 SSLPolicyBackend* backend_; |
| 99 | 104 |
| 100 DISALLOW_COPY_AND_ASSIGN(SSLPolicy); | 105 DISALLOW_COPY_AND_ASSIGN(SSLPolicy); |
| 101 }; | 106 }; |
| 102 | 107 |
| 103 #endif // CHROME_BROWSER_SSL_SSL_POLICY_H_ | 108 #endif // CHROME_BROWSER_SSL_SSL_POLICY_H_ |
| OLD | NEW |