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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10828342: Per-host V8 histograms. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: better version Created 8 years, 4 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 | Annotate | Revision Log
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 &params.browser_initiated_post_data.front()), 1111 &params.browser_initiated_post_data.front()),
1112 params.browser_initiated_post_data.size())); 1112 params.browser_initiated_post_data.size()));
1113 request.setHTTPBody(http_body); 1113 request.setHTTPBody(http_body);
1114 } 1114 }
1115 1115
1116 main_frame->loadRequest(request); 1116 main_frame->loadRequest(request);
1117 } 1117 }
1118 1118
1119 // In case LoadRequest failed before DidCreateDataSource was called. 1119 // In case LoadRequest failed before DidCreateDataSource was called.
1120 pending_navigation_params_.reset(); 1120 pending_navigation_params_.reset();
1121
1122 // Check if all RenderViewImpls are displaying a page from the same host, and
1123 // update RenderThreadImpl's view on that. If this is the only RenderViewImpl,
1124 // the common host is this view's host. If there are many, check if this one
1125 // shares the common host of the other RenderViewImpls. It's ok to not detect
1126 // some cases where the RenderViewImpls share a common host.
Charlie Reis 2012/08/16 16:22:56 This isn't safe. You'll miss renderer-initiated n
marja 2012/08/21 15:21:15 Changed this to do the work in RenderViewImpl::did
1127 RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
1128 if (g_view_map.Get().size() == 1)
1129 render_thread_impl->SetCommonHost(params.url.host());
1130 else if (params.url.host() != render_thread_impl->CommonHost())
1131 render_thread_impl->SetCommonHost(std::string());
1121 } 1132 }
1122 1133
1123 bool RenderViewImpl::IsBackForwardToStaleEntry( 1134 bool RenderViewImpl::IsBackForwardToStaleEntry(
1124 const ViewMsg_Navigate_Params& params, 1135 const ViewMsg_Navigate_Params& params,
1125 bool is_reload) { 1136 bool is_reload) {
1126 // Make sure this isn't a back/forward to an entry we have already cropped 1137 // Make sure this isn't a back/forward to an entry we have already cropped
1127 // or replaced from our history, before the browser knew about it. If so, 1138 // or replaced from our history, before the browser knew about it. If so,
1128 // a new navigation has committed in the mean time, and we can ignore this. 1139 // a new navigation has committed in the mean time, and we can ignore this.
1129 bool is_back_forward = !is_reload && !params.state.empty(); 1140 bool is_back_forward = !is_reload && !params.state.empty();
1130 1141
(...skipping 4643 matching lines...) Expand 10 before | Expand all | Expand 10 after
5774 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5785 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5775 return !!RenderThreadImpl::current()->compositor_thread(); 5786 return !!RenderThreadImpl::current()->compositor_thread();
5776 } 5787 }
5777 5788
5778 void RenderViewImpl::OnJavaBridgeInit() { 5789 void RenderViewImpl::OnJavaBridgeInit() {
5779 DCHECK(!java_bridge_dispatcher_); 5790 DCHECK(!java_bridge_dispatcher_);
5780 #if defined(ENABLE_JAVA_BRIDGE) 5791 #if defined(ENABLE_JAVA_BRIDGE)
5781 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5792 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5782 #endif 5793 #endif
5783 } 5794 }
OLDNEW
« content/renderer/render_thread_impl.cc ('K') | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698