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 "chrome/browser/ssl/ssl_policy.h" | 5 #include "content/browser/ssl/ssl_policy.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "chrome/browser/ssl/ssl_cert_error_handler.h" | |
13 #include "chrome/browser/ssl/ssl_error_info.h" | 12 #include "chrome/browser/ssl/ssl_error_info.h" |
14 #include "chrome/browser/ssl/ssl_request_info.h" | |
15 #include "chrome/common/jstemplate_builder.h" | |
16 #include "chrome/common/time_format.h" | |
17 #include "chrome/common/url_constants.h" | |
18 #include "content/browser/renderer_host/render_process_host.h" | 13 #include "content/browser/renderer_host/render_process_host.h" |
19 #include "content/browser/renderer_host/render_view_host.h" | 14 #include "content/browser/renderer_host/render_view_host.h" |
20 #include "content/browser/site_instance.h" | 15 #include "content/browser/site_instance.h" |
| 16 #include "content/browser/ssl/ssl_cert_error_handler.h" |
| 17 #include "content/browser/ssl/ssl_request_info.h" |
21 #include "content/browser/tab_contents/navigation_entry.h" | 18 #include "content/browser/tab_contents/navigation_entry.h" |
22 #include "content/browser/tab_contents/tab_contents.h" | 19 #include "content/browser/tab_contents/tab_contents.h" |
23 #include "grit/generated_resources.h" | 20 #include "content/common/url_constants.h" |
24 #include "net/base/cert_status_flags.h" | 21 #include "net/base/cert_status_flags.h" |
25 #include "net/base/ssl_info.h" | 22 #include "net/base/ssl_info.h" |
26 #include "webkit/glue/resource_type.h" | 23 #include "webkit/glue/resource_type.h" |
27 | 24 |
28 namespace { | 25 namespace { |
29 | 26 |
30 static const char kDot = '.'; | 27 static const char kDot = '.'; |
31 | 28 |
32 static bool IsIntranetHost(const std::string& host) { | 29 static bool IsIntranetHost(const std::string& host) { |
33 const size_t dot = host.find(kDot); | 30 const size_t dot = host.find(kDot); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 214 |
218 entry->ssl().set_security_style(entry->url().SchemeIsSecure() ? | 215 entry->ssl().set_security_style(entry->url().SchemeIsSecure() ? |
219 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED); | 216 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED); |
220 } | 217 } |
221 | 218 |
222 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { | 219 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { |
223 GURL parsed_origin(origin); | 220 GURL parsed_origin(origin); |
224 if (parsed_origin.SchemeIsSecure()) | 221 if (parsed_origin.SchemeIsSecure()) |
225 backend_->HostRanInsecureContent(parsed_origin.host(), pid); | 222 backend_->HostRanInsecureContent(parsed_origin.host(), pid); |
226 } | 223 } |
OLD | NEW |