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 #include "chrome/common/security_filter_peer.h" | 5 #include "chrome/common/security_filter_peer.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/gfx/png_encoder.h" | 9 #include "base/gfx/png_encoder.h" |
10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 switch (os_error) { | 68 switch (os_error) { |
69 case net::ERR_SSL_PROTOCOL_ERROR: | 69 case net::ERR_SSL_PROTOCOL_ERROR: |
70 case net::ERR_CERT_COMMON_NAME_INVALID: | 70 case net::ERR_CERT_COMMON_NAME_INVALID: |
71 case net::ERR_CERT_DATE_INVALID: | 71 case net::ERR_CERT_DATE_INVALID: |
72 case net::ERR_CERT_AUTHORITY_INVALID: | 72 case net::ERR_CERT_AUTHORITY_INVALID: |
73 case net::ERR_CERT_CONTAINS_ERRORS: | 73 case net::ERR_CERT_CONTAINS_ERRORS: |
74 case net::ERR_CERT_NO_REVOCATION_MECHANISM: | 74 case net::ERR_CERT_NO_REVOCATION_MECHANISM: |
75 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: | 75 case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION: |
76 case net::ERR_CERT_REVOKED: | 76 case net::ERR_CERT_REVOKED: |
77 case net::ERR_CERT_INVALID: | 77 case net::ERR_CERT_INVALID: |
| 78 case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM: |
78 case net::ERR_INSECURE_RESPONSE: | 79 case net::ERR_INSECURE_RESPONSE: |
79 if (ResourceType::IsFrame(resource_type)) | 80 if (ResourceType::IsFrame(resource_type)) |
80 return CreateSecurityFilterPeerForFrame(peer, os_error); | 81 return CreateSecurityFilterPeerForFrame(peer, os_error); |
81 // Any other content is entirely filtered-out. | 82 // Any other content is entirely filtered-out. |
82 return new ReplaceContentPeer(NULL, peer, std::string(), std::string()); | 83 return new ReplaceContentPeer(NULL, peer, std::string(), std::string()); |
83 default: | 84 default: |
84 // For other errors, we use our normal error handling. | 85 // For other errors, we use our normal error handling. |
85 return NULL; | 86 return NULL; |
86 } | 87 } |
87 } | 88 } |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 return false; | 315 return false; |
315 } | 316 } |
316 | 317 |
317 // Copy the vector content to data_ which is a string. | 318 // Copy the vector content to data_ which is a string. |
318 data_.clear(); | 319 data_.clear(); |
319 data_.resize(output.size()); | 320 data_.resize(output.size()); |
320 std::copy(output.begin(), output.end(), data_.begin()); | 321 std::copy(output.begin(), output.end(), data_.begin()); |
321 | 322 |
322 return true; | 323 return true; |
323 } | 324 } |
OLD | NEW |