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

Side by Side Diff: content/browser/frame_host/render_frame_proxy_host.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_proxy_host.h" 5 #include "content/browser/frame_host/render_frame_proxy_host.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "content/browser/frame_host/cross_process_frame_connector.h" 8 #include "content/browser/frame_host/cross_process_frame_connector.h"
9 #include "content/browser/frame_host/frame_tree.h" 9 #include "content/browser/frame_host/frame_tree.h"
10 #include "content/browser/frame_host/frame_tree_node.h" 10 #include "content/browser/frame_host/frame_tree_node.h"
(...skipping 15 matching lines...) Expand all
26 typedef base::hash_map<RenderFrameProxyHostID, RenderFrameProxyHost*> 26 typedef base::hash_map<RenderFrameProxyHostID, RenderFrameProxyHost*>
27 RoutingIDFrameProxyMap; 27 RoutingIDFrameProxyMap;
28 base::LazyInstance<RoutingIDFrameProxyMap> g_routing_id_frame_proxy_map = 28 base::LazyInstance<RoutingIDFrameProxyMap> g_routing_id_frame_proxy_map =
29 LAZY_INSTANCE_INITIALIZER; 29 LAZY_INSTANCE_INITIALIZER;
30 30
31 } 31 }
32 32
33 // static 33 // static
34 RenderFrameProxyHost* RenderFrameProxyHost::FromID(int process_id, 34 RenderFrameProxyHost* RenderFrameProxyHost::FromID(int process_id,
35 int routing_id) { 35 int routing_id) {
36 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 36 DCHECK_CURRENTLY_ON(BrowserThread::UI);
37 RoutingIDFrameProxyMap* frames = g_routing_id_frame_proxy_map.Pointer(); 37 RoutingIDFrameProxyMap* frames = g_routing_id_frame_proxy_map.Pointer();
38 RoutingIDFrameProxyMap::iterator it = frames->find( 38 RoutingIDFrameProxyMap::iterator it = frames->find(
39 RenderFrameProxyHostID(process_id, routing_id)); 39 RenderFrameProxyHostID(process_id, routing_id));
40 return it == frames->end() ? NULL : it->second; 40 return it == frames->end() ? NULL : it->second;
41 } 41 }
42 42
43 RenderFrameProxyHost::RenderFrameProxyHost(SiteInstance* site_instance, 43 RenderFrameProxyHost::RenderFrameProxyHost(SiteInstance* site_instance,
44 FrameTreeNode* frame_tree_node) 44 FrameTreeNode* frame_tree_node)
45 : routing_id_(site_instance->GetProcess()->GetNextRoutingID()), 45 : routing_id_(site_instance->GetProcess()->GetNextRoutingID()),
46 site_instance_(site_instance), 46 site_instance_(site_instance),
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void RenderFrameProxyHost::DisownOpener() { 156 void RenderFrameProxyHost::DisownOpener() {
157 Send(new FrameMsg_DisownOpener(GetRoutingID())); 157 Send(new FrameMsg_DisownOpener(GetRoutingID()));
158 } 158 }
159 159
160 void RenderFrameProxyHost::OnOpenURL( 160 void RenderFrameProxyHost::OnOpenURL(
161 const FrameHostMsg_OpenURL_Params& params) { 161 const FrameHostMsg_OpenURL_Params& params) {
162 frame_tree_node_->current_frame_host()->OpenURL(params, site_instance_.get()); 162 frame_tree_node_->current_frame_host()->OpenURL(params, site_instance_.get());
163 } 163 }
164 164
165 } // namespace content 165 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_message_filter.cc ('k') | content/browser/geolocation/geolocation_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698