OLD | NEW |
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/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 bool user_gesture) { | 557 bool user_gesture) { |
558 GURL dest_url(url); | 558 GURL dest_url(url); |
559 SiteInstance* current_site_instance = | 559 SiteInstance* current_site_instance = |
560 GetRenderManager(render_frame_host)->current_frame_host()-> | 560 GetRenderManager(render_frame_host)->current_frame_host()-> |
561 GetSiteInstance(); | 561 GetSiteInstance(); |
562 if (!GetContentClient()->browser()->ShouldAllowOpenURL( | 562 if (!GetContentClient()->browser()->ShouldAllowOpenURL( |
563 current_site_instance, url)) { | 563 current_site_instance, url)) { |
564 dest_url = GURL(url::kAboutBlankURL); | 564 dest_url = GURL(url::kAboutBlankURL); |
565 } | 565 } |
566 | 566 |
567 int64 frame_tree_node_id = -1; | 567 int frame_tree_node_id = -1; |
568 | 568 |
569 // Send the navigation to the current FrameTreeNode if it's destined for a | 569 // Send the navigation to the current FrameTreeNode if it's destined for a |
570 // subframe in the current tab. We'll assume it's for the main frame | 570 // subframe in the current tab. We'll assume it's for the main frame |
571 // (possibly of a new or different WebContents) otherwise. | 571 // (possibly of a new or different WebContents) otherwise. |
572 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 572 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
573 switches::kSitePerProcess) && | 573 switches::kSitePerProcess) && |
574 disposition == CURRENT_TAB && | 574 disposition == CURRENT_TAB && |
575 render_frame_host->GetParent()) { | 575 render_frame_host->GetParent()) { |
576 frame_tree_node_id = | 576 frame_tree_node_id = |
577 render_frame_host->frame_tree_node()->frame_tree_node_id(); | 577 render_frame_host->frame_tree_node()->frame_tree_node_id(); |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 894 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
895 time_to_commit); | 895 time_to_commit); |
896 UMA_HISTOGRAM_TIMES( | 896 UMA_HISTOGRAM_TIMES( |
897 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 897 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
898 time_to_network); | 898 time_to_network); |
899 } | 899 } |
900 navigation_data_.reset(); | 900 navigation_data_.reset(); |
901 } | 901 } |
902 | 902 |
903 } // namespace content | 903 } // namespace content |
OLD | NEW |