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 3445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3456 GetRenderProcessHost()->GetStoragePartition()-> | 3456 GetRenderProcessHost()->GetStoragePartition()-> |
3457 GetURLRequestContext()); | 3457 GetURLRequestContext()); |
3458 BrowserThread::PostTask( | 3458 BrowserThread::PostTask( |
3459 BrowserThread::IO, | 3459 BrowserThread::IO, |
3460 FROM_HERE, | 3460 FROM_HERE, |
3461 base::Bind(&NotifyCacheOnIO, request_context, url, http_method)); | 3461 base::Bind(&NotifyCacheOnIO, request_context, url, http_method)); |
3462 } | 3462 } |
3463 } | 3463 } |
3464 | 3464 |
3465 void WebContentsImpl::OnDidDisplayInsecureContent() { | 3465 void WebContentsImpl::OnDidDisplayInsecureContent() { |
| 3466 DidDisplayInsecureContent(); |
| 3467 } |
| 3468 |
| 3469 void WebContentsImpl::DidDisplayInsecureContent() { |
3466 RecordAction(base::UserMetricsAction("SSL.DisplayedInsecureContent")); | 3470 RecordAction(base::UserMetricsAction("SSL.DisplayedInsecureContent")); |
3467 displayed_insecure_content_ = true; | 3471 displayed_insecure_content_ = true; |
3468 SSLManager::NotifySSLInternalStateChanged( | 3472 SSLManager::NotifySSLInternalStateChanged( |
3469 GetController().GetBrowserContext()); | 3473 GetController().GetBrowserContext()); |
3470 } | 3474 } |
3471 | 3475 |
3472 void WebContentsImpl::OnDidRunInsecureContent(const GURL& security_origin, | 3476 void WebContentsImpl::OnDidRunInsecureContent(const GURL& security_origin, |
3473 const GURL& target_url) { | 3477 const GURL& target_url) { |
| 3478 DidRunInsecureContent(security_origin, target_url); |
| 3479 } |
| 3480 |
| 3481 void WebContentsImpl::DidRunInsecureContent(const GURL& security_origin, |
| 3482 const GURL& target_url) { |
3474 LOG(WARNING) << security_origin << " ran insecure content from " | 3483 LOG(WARNING) << security_origin << " ran insecure content from " |
3475 << target_url.possibly_invalid_spec(); | 3484 << target_url.possibly_invalid_spec(); |
3476 RecordAction(base::UserMetricsAction("SSL.RanInsecureContent")); | 3485 RecordAction(base::UserMetricsAction("SSL.RanInsecureContent")); |
3477 if (base::EndsWith(security_origin.spec(), kDotGoogleDotCom, | 3486 if (base::EndsWith(security_origin.spec(), kDotGoogleDotCom, |
3478 base::CompareCase::INSENSITIVE_ASCII)) | 3487 base::CompareCase::INSENSITIVE_ASCII)) |
3479 RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle")); | 3488 RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle")); |
3480 controller_.ssl_manager()->DidRunInsecureContent(security_origin); | 3489 controller_.ssl_manager()->DidRunInsecureContent(security_origin); |
3481 SSLManager::NotifySSLInternalStateChanged( | 3490 SSLManager::NotifySSLInternalStateChanged( |
3482 GetController().GetBrowserContext()); | 3491 GetController().GetBrowserContext()); |
3483 } | 3492 } |
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5170 for (RenderViewHost* render_view_host : render_view_host_set) | 5179 for (RenderViewHost* render_view_host : render_view_host_set) |
5171 render_view_host->OnWebkitPreferencesChanged(); | 5180 render_view_host->OnWebkitPreferencesChanged(); |
5172 } | 5181 } |
5173 | 5182 |
5174 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5183 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5175 JavaScriptDialogManager* dialog_manager) { | 5184 JavaScriptDialogManager* dialog_manager) { |
5176 dialog_manager_ = dialog_manager; | 5185 dialog_manager_ = dialog_manager; |
5177 } | 5186 } |
5178 | 5187 |
5179 } // namespace content | 5188 } // namespace content |
OLD | NEW |