OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.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" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 break; | 244 break; |
245 default: | 245 default: |
246 NOTREACHED(); | 246 NOTREACHED(); |
247 } | 247 } |
248 } | 248 } |
249 | 249 |
250 void SSLPolicy::InitializeEntryIfNeeded(NavigationEntryImpl* entry) { | 250 void SSLPolicy::InitializeEntryIfNeeded(NavigationEntryImpl* entry) { |
251 if (entry->GetSSL().security_style != SECURITY_STYLE_UNKNOWN) | 251 if (entry->GetSSL().security_style != SECURITY_STYLE_UNKNOWN) |
252 return; | 252 return; |
253 | 253 |
254 entry->GetSSL().security_style = entry->GetURL().SchemeIsCryptographic() ? | 254 entry->GetSSL().security_style = entry->GetURL().SchemeIsCryptographic() |
255 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED; | 255 ? SECURITY_STYLE_AUTHENTICATED |
| 256 : SECURITY_STYLE_UNAUTHENTICATED; |
256 } | 257 } |
257 | 258 |
258 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { | 259 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { |
259 GURL parsed_origin(origin); | 260 GURL parsed_origin(origin); |
260 if (parsed_origin.SchemeIsCryptographic()) | 261 if (parsed_origin.SchemeIsCryptographic()) |
261 backend_->HostRanInsecureContent(parsed_origin.host(), pid); | 262 backend_->HostRanInsecureContent(parsed_origin.host(), pid); |
262 } | 263 } |
263 | 264 |
264 } // namespace content | 265 } // namespace content |
OLD | NEW |