Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 883503003: Remove CHECKs from WebContentsImpl::OnDocumentLoadedInFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Charlie's review. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 RecordAction(base::UserMetricsAction("SSL.RanInsecureContent")); 2756 RecordAction(base::UserMetricsAction("SSL.RanInsecureContent"));
2757 if (EndsWith(security_origin, kDotGoogleDotCom, false)) 2757 if (EndsWith(security_origin, kDotGoogleDotCom, false))
2758 RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle")); 2758 RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle"));
2759 controller_.ssl_manager()->DidRunInsecureContent(security_origin); 2759 controller_.ssl_manager()->DidRunInsecureContent(security_origin);
2760 displayed_insecure_content_ = true; 2760 displayed_insecure_content_ = true;
2761 SSLManager::NotifySSLInternalStateChanged( 2761 SSLManager::NotifySSLInternalStateChanged(
2762 GetController().GetBrowserContext()); 2762 GetController().GetBrowserContext());
2763 } 2763 }
2764 2764
2765 void WebContentsImpl::OnDocumentLoadedInFrame() { 2765 void WebContentsImpl::OnDocumentLoadedInFrame() {
2766 CHECK(render_frame_message_source_); 2766 if (!render_frame_message_source_) {
2767 CHECK(!render_view_message_source_); 2767 RecordAction(base::UserMetricsAction("BadMessageTerminate_WC"));
2768 GetRenderProcessHost()->ReceivedBadMessage();
2769 return;
2770 }
2771
2768 RenderFrameHostImpl* rfh = 2772 RenderFrameHostImpl* rfh =
2769 static_cast<RenderFrameHostImpl*>(render_frame_message_source_); 2773 static_cast<RenderFrameHostImpl*>(render_frame_message_source_);
2770 FOR_EACH_OBSERVER( 2774 FOR_EACH_OBSERVER(
2771 WebContentsObserver, observers_, DocumentLoadedInFrame(rfh)); 2775 WebContentsObserver, observers_, DocumentLoadedInFrame(rfh));
2772 } 2776 }
2773 2777
2774 void WebContentsImpl::OnDidFinishLoad( 2778 void WebContentsImpl::OnDidFinishLoad(const GURL& url) {
2775 const GURL& url) {
2776 if (!render_frame_message_source_) { 2779 if (!render_frame_message_source_) {
2777 RecordAction(base::UserMetricsAction("BadMessageTerminate_RVD2")); 2780 RecordAction(base::UserMetricsAction("BadMessageTerminate_WC"));
2778 GetRenderProcessHost()->ReceivedBadMessage(); 2781 GetRenderProcessHost()->ReceivedBadMessage();
2779 return; 2782 return;
2780 } 2783 }
2781 2784
2782 GURL validated_url(url); 2785 GURL validated_url(url);
2783 RenderProcessHost* render_process_host = 2786 RenderProcessHost* render_process_host =
2784 render_frame_message_source_->GetProcess(); 2787 render_frame_message_source_->GetProcess();
2785 render_process_host->FilterURL(false, &validated_url); 2788 render_process_host->FilterURL(false, &validated_url);
2786 2789
2787 RenderFrameHostImpl* rfh = 2790 RenderFrameHostImpl* rfh =
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
4450 node->render_manager()->ResumeResponseDeferredAtStart(); 4453 node->render_manager()->ResumeResponseDeferredAtStart();
4451 } 4454 }
4452 4455
4453 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4456 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4454 force_disable_overscroll_content_ = force_disable; 4457 force_disable_overscroll_content_ = force_disable;
4455 if (view_) 4458 if (view_)
4456 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4459 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4457 } 4460 }
4458 4461
4459 } // namespace content 4462 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698