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

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: . 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 3153 matching lines...) Expand 10 before | Expand all | Expand 10 after
3164 navigation_state->set_request_committed(true); 3164 navigation_state->set_request_committed(true);
3165 3165
3166 UpdateURL(frame); 3166 UpdateURL(frame);
3167 3167
3168 // If this committed load was initiated by a client redirect, we're 3168 // If this committed load was initiated by a client redirect, we're
3169 // at the last stop now, so clear it. 3169 // at the last stop now, so clear it.
3170 completed_client_redirect_src_ = Referrer(); 3170 completed_client_redirect_src_ = Referrer();
3171 3171
3172 // Check whether we have new encoding name. 3172 // Check whether we have new encoding name.
3173 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); 3173 UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
3174
3175 if (!frame->parent()) { // Only for top frames.
3176 // Check if all RenderViewImpls are displaying a page from the same host,
3177 // and update RenderThreadImpl's view on that. If this is the only
3178 // RenderViewImpl, the common host is this view's host. If there are many,
3179 // check if this one shares the common host of the other
3180 // RenderViewImpls. It's ok to not detect some cases where the
3181 // RenderViewImpls share a common host.
3182 std::string host = GURL(frame->document().url()).host();
3183 RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
3184 if (g_view_map.Get().size() == 1)
3185 render_thread_impl->SetCommonHost(host);
3186 else if (host != render_thread_impl->CommonHost())
3187 render_thread_impl->SetCommonHost(std::string());
3188 }
3174 } 3189 }
3175 3190
3176 void RenderViewImpl::didClearWindowObject(WebFrame* frame) { 3191 void RenderViewImpl::didClearWindowObject(WebFrame* frame) {
3177 FOR_EACH_OBSERVER(RenderViewObserver, observers_, 3192 FOR_EACH_OBSERVER(RenderViewObserver, observers_,
3178 DidClearWindowObject(frame)); 3193 DidClearWindowObject(frame));
3179 3194
3180 GURL frame_url = frame->document().url(); 3195 GURL frame_url = frame->document().url();
3181 if ((enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) && 3196 if ((enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) &&
3182 (frame_url.SchemeIs(chrome::kChromeUIScheme) || 3197 (frame_url.SchemeIs(chrome::kChromeUIScheme) ||
3183 frame_url.SchemeIs(chrome::kDataScheme))) { 3198 frame_url.SchemeIs(chrome::kDataScheme))) {
(...skipping 2590 matching lines...) Expand 10 before | Expand all | Expand 10 after
5774 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5789 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5775 return !!RenderThreadImpl::current()->compositor_thread(); 5790 return !!RenderThreadImpl::current()->compositor_thread();
5776 } 5791 }
5777 5792
5778 void RenderViewImpl::OnJavaBridgeInit() { 5793 void RenderViewImpl::OnJavaBridgeInit() {
5779 DCHECK(!java_bridge_dispatcher_); 5794 DCHECK(!java_bridge_dispatcher_);
5780 #if defined(ENABLE_JAVA_BRIDGE) 5795 #if defined(ENABLE_JAVA_BRIDGE)
5781 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5796 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5782 #endif 5797 #endif
5783 } 5798 }
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