| 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/browser/ssl/ssl_policy.h" | 5 #include "chrome/browser/ssl/ssl_policy.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/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 OnFatalCertError(handler); | 79 OnFatalCertError(handler); |
| 80 break; | 80 break; |
| 81 default: | 81 default: |
| 82 NOTREACHED(); | 82 NOTREACHED(); |
| 83 handler->CancelRequest(); | 83 handler->CancelRequest(); |
| 84 break; | 84 break; |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 void SSLPolicy::DidDisplayInsecureContent(NavigationEntry* entry) { | 88 void SSLPolicy::DidDisplayInsecureContent(NavigationEntry* entry) { |
| 89 if (!entry) |
| 90 return; |
| 91 |
| 89 // TODO(abarth): We don't actually need to break the whole origin here, | 92 // TODO(abarth): We don't actually need to break the whole origin here, |
| 90 // but we can handle that in a later patch. | 93 // but we can handle that in a later patch. |
| 91 DidRunInsecureContent(entry, entry->url().spec()); | 94 DidRunInsecureContent(entry, entry->url().spec()); |
| 92 } | 95 } |
| 93 | 96 |
| 94 void SSLPolicy::DidRunInsecureContent(NavigationEntry* entry, | 97 void SSLPolicy::DidRunInsecureContent(NavigationEntry* entry, |
| 95 const std::string& security_origin) { | 98 const std::string& security_origin) { |
| 96 if (!entry) | 99 if (!entry) |
| 97 return; | 100 return; |
| 98 | 101 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 // mark the main frame's origin as broken too. | 282 // mark the main frame's origin as broken too. |
| 280 MarkOriginAsBroken(info->main_frame_origin(), info->child_id()); | 283 MarkOriginAsBroken(info->main_frame_origin(), info->child_id()); |
| 281 } | 284 } |
| 282 } | 285 } |
| 283 | 286 |
| 284 void SSLPolicy::UpdateStateForUnsafeContent(SSLRequestInfo* info) { | 287 void SSLPolicy::UpdateStateForUnsafeContent(SSLRequestInfo* info) { |
| 285 // This request as a broken cert, which means its host is broken. | 288 // This request as a broken cert, which means its host is broken. |
| 286 backend_->MarkHostAsBroken(info->url().host(), info->child_id()); | 289 backend_->MarkHostAsBroken(info->url().host(), info->child_id()); |
| 287 UpdateStateForMixedContent(info); | 290 UpdateStateForMixedContent(info); |
| 288 } | 291 } |
| OLD | NEW |