| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/ssl/ssl_policy.h" | 5 #include "content/browser/ssl/ssl_policy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| 11 #include "base/string_piece.h" | 11 #include "base/string_piece.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "content/browser/renderer_host/render_process_host_impl.h" | 13 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 14 #include "content/browser/renderer_host/render_view_host.h" | 14 #include "content/browser/renderer_host/render_view_host.h" |
| 15 #include "content/browser/site_instance_impl.h" | 15 #include "content/browser/site_instance_impl.h" |
| 16 #include "content/browser/ssl/ssl_cert_error_handler.h" | 16 #include "content/browser/ssl/ssl_cert_error_handler.h" |
| 17 #include "content/browser/ssl/ssl_request_info.h" | 17 #include "content/browser/ssl/ssl_request_info.h" |
| 18 #include "content/browser/tab_contents/navigation_entry_impl.h" | 18 #include "content/browser/tab_contents/navigation_entry_impl.h" |
| 19 #include "content/browser/tab_contents/tab_contents.h" | 19 #include "content/browser/tab_contents/tab_contents.h" |
| 20 #include "content/public/browser/content_browser_client.h" | 20 #include "content/public/browser/content_browser_client.h" |
| 21 #include "content/public/browser/ssl_status.h" | 21 #include "content/public/common/ssl_status.h" |
| 22 #include "content/public/common/url_constants.h" | 22 #include "content/public/common/url_constants.h" |
| 23 #include "net/base/cert_status_flags.h" | |
| 24 #include "net/base/ssl_info.h" | 23 #include "net/base/ssl_info.h" |
| 25 #include "webkit/glue/resource_type.h" | 24 #include "webkit/glue/resource_type.h" |
| 26 | 25 |
| 27 using content::NavigationEntryImpl; | 26 using content::NavigationEntryImpl; |
| 28 using content::SiteInstance; | 27 using content::SiteInstance; |
| 29 using content::SSLStatus; | 28 using content::SSLStatus; |
| 30 | 29 |
| 31 namespace { | 30 namespace { |
| 32 | 31 |
| 33 static const char kDot = '.'; | 32 static const char kDot = '.'; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 entry->GetSSL().security_style = entry->GetURL().SchemeIsSecure() ? | 215 entry->GetSSL().security_style = entry->GetURL().SchemeIsSecure() ? |
| 217 content::SECURITY_STYLE_AUTHENTICATED : | 216 content::SECURITY_STYLE_AUTHENTICATED : |
| 218 content::SECURITY_STYLE_UNAUTHENTICATED; | 217 content::SECURITY_STYLE_UNAUTHENTICATED; |
| 219 } | 218 } |
| 220 | 219 |
| 221 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { | 220 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { |
| 222 GURL parsed_origin(origin); | 221 GURL parsed_origin(origin); |
| 223 if (parsed_origin.SchemeIsSecure()) | 222 if (parsed_origin.SchemeIsSecure()) |
| 224 backend_->HostRanInsecureContent(parsed_origin.host(), pid); | 223 backend_->HostRanInsecureContent(parsed_origin.host(), pid); |
| 225 } | 224 } |
| OLD | NEW |