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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1000373002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[f-p]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // static 117 // static
118 RenderFrameHost* RenderFrameHost::FromID(int render_process_id, 118 RenderFrameHost* RenderFrameHost::FromID(int render_process_id,
119 int render_frame_id) { 119 int render_frame_id) {
120 return RenderFrameHostImpl::FromID(render_process_id, render_frame_id); 120 return RenderFrameHostImpl::FromID(render_process_id, render_frame_id);
121 } 121 }
122 122
123 // static 123 // static
124 RenderFrameHostImpl* RenderFrameHostImpl::FromID(int process_id, 124 RenderFrameHostImpl* RenderFrameHostImpl::FromID(int process_id,
125 int routing_id) { 125 int routing_id) {
126 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 126 DCHECK_CURRENTLY_ON(BrowserThread::UI);
127 RoutingIDFrameMap* frames = g_routing_id_frame_map.Pointer(); 127 RoutingIDFrameMap* frames = g_routing_id_frame_map.Pointer();
128 RoutingIDFrameMap::iterator it = frames->find( 128 RoutingIDFrameMap::iterator it = frames->find(
129 RenderFrameHostID(process_id, routing_id)); 129 RenderFrameHostID(process_id, routing_id));
130 return it == frames->end() ? NULL : it->second; 130 return it == frames->end() ? NULL : it->second;
131 } 131 }
132 132
133 RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance, 133 RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance,
134 RenderViewHostImpl* render_view_host, 134 RenderViewHostImpl* render_view_host,
135 RenderFrameHostDelegate* delegate, 135 RenderFrameHostDelegate* delegate,
136 RenderWidgetHostDelegate* rwh_delegate, 136 RenderWidgetHostDelegate* rwh_delegate,
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 void RenderFrameHostImpl::DidUseGeolocationPermission() { 1970 void RenderFrameHostImpl::DidUseGeolocationPermission() {
1971 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); 1971 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame();
1972 GetContentClient()->browser()->RegisterPermissionUsage( 1972 GetContentClient()->browser()->RegisterPermissionUsage(
1973 PERMISSION_GEOLOCATION, 1973 PERMISSION_GEOLOCATION,
1974 delegate_->GetAsWebContents(), 1974 delegate_->GetAsWebContents(),
1975 GetLastCommittedURL().GetOrigin(), 1975 GetLastCommittedURL().GetOrigin(),
1976 top_frame->GetLastCommittedURL().GetOrigin()); 1976 top_frame->GetLastCommittedURL().GetOrigin());
1977 } 1977 }
1978 1978
1979 } // namespace content 1979 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/interstitial_page_impl.cc ('k') | content/browser/frame_host/render_frame_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698