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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 3433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3444 GetRenderProcessHost()->GetStoragePartition()-> | 3444 GetRenderProcessHost()->GetStoragePartition()-> |
3445 GetURLRequestContext()); | 3445 GetURLRequestContext()); |
3446 BrowserThread::PostTask( | 3446 BrowserThread::PostTask( |
3447 BrowserThread::IO, | 3447 BrowserThread::IO, |
3448 FROM_HERE, | 3448 FROM_HERE, |
3449 base::Bind(&NotifyCacheOnIO, request_context, url, http_method)); | 3449 base::Bind(&NotifyCacheOnIO, request_context, url, http_method)); |
3450 } | 3450 } |
3451 } | 3451 } |
3452 | 3452 |
3453 void WebContentsImpl::OnDidDisplayInsecureContent() { | 3453 void WebContentsImpl::OnDidDisplayInsecureContent() { |
| 3454 DidDisplayInsecureContent(); |
| 3455 } |
| 3456 |
| 3457 void WebContentsImpl::DidDisplayInsecureContent() { |
3454 RecordAction(base::UserMetricsAction("SSL.DisplayedInsecureContent")); | 3458 RecordAction(base::UserMetricsAction("SSL.DisplayedInsecureContent")); |
3455 displayed_insecure_content_ = true; | 3459 displayed_insecure_content_ = true; |
3456 SSLManager::NotifySSLInternalStateChanged( | 3460 SSLManager::NotifySSLInternalStateChanged( |
3457 GetController().GetBrowserContext()); | 3461 GetController().GetBrowserContext()); |
3458 } | 3462 } |
3459 | 3463 |
3460 void WebContentsImpl::OnDidRunInsecureContent(const GURL& security_origin, | 3464 void WebContentsImpl::OnDidRunInsecureContent(const GURL& security_origin, |
3461 const GURL& target_url) { | 3465 const GURL& target_url) { |
| 3466 DidRunInsecureContent(security_origin, target_url); |
| 3467 } |
| 3468 |
| 3469 void WebContentsImpl::DidRunInsecureContent(const GURL& security_origin, |
| 3470 const GURL& target_url) { |
3462 LOG(WARNING) << security_origin << " ran insecure content from " | 3471 LOG(WARNING) << security_origin << " ran insecure content from " |
3463 << target_url.possibly_invalid_spec(); | 3472 << target_url.possibly_invalid_spec(); |
3464 RecordAction(base::UserMetricsAction("SSL.RanInsecureContent")); | 3473 RecordAction(base::UserMetricsAction("SSL.RanInsecureContent")); |
3465 if (base::EndsWith(security_origin.spec(), kDotGoogleDotCom, | 3474 if (base::EndsWith(security_origin.spec(), kDotGoogleDotCom, |
3466 base::CompareCase::INSENSITIVE_ASCII)) | 3475 base::CompareCase::INSENSITIVE_ASCII)) |
3467 RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle")); | 3476 RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle")); |
3468 controller_.ssl_manager()->DidRunInsecureContent(security_origin); | 3477 controller_.ssl_manager()->DidRunInsecureContent(security_origin); |
3469 SSLManager::NotifySSLInternalStateChanged( | 3478 SSLManager::NotifySSLInternalStateChanged( |
3470 GetController().GetBrowserContext()); | 3479 GetController().GetBrowserContext()); |
3471 } | 3480 } |
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5161 for (RenderViewHost* render_view_host : render_view_host_set) | 5170 for (RenderViewHost* render_view_host : render_view_host_set) |
5162 render_view_host->OnWebkitPreferencesChanged(); | 5171 render_view_host->OnWebkitPreferencesChanged(); |
5163 } | 5172 } |
5164 | 5173 |
5165 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5174 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5166 JavaScriptDialogManager* dialog_manager) { | 5175 JavaScriptDialogManager* dialog_manager) { |
5167 dialog_manager_ = dialog_manager; | 5176 dialog_manager_ = dialog_manager; |
5168 } | 5177 } |
5169 | 5178 |
5170 } // namespace content | 5179 } // namespace content |
OLD | NEW |