| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 frame_tree->root()->render_manager()->DidNavigateFrame( | 406 frame_tree->root()->render_manager()->DidNavigateFrame( |
| 407 render_frame_host, params.gesture == NavigationGestureUser); | 407 render_frame_host, params.gesture == NavigationGestureUser); |
| 408 } | 408 } |
| 409 | 409 |
| 410 // Save the origin of the new page. Do this before calling | 410 // Save the origin of the new page. Do this before calling |
| 411 // DidNavigateFrame(), because the origin needs to be included in the SwapOut | 411 // DidNavigateFrame(), because the origin needs to be included in the SwapOut |
| 412 // message, which is sent inside DidNavigateFrame(). SwapOut needs the | 412 // message, which is sent inside DidNavigateFrame(). SwapOut needs the |
| 413 // origin because it creates a RenderFrameProxy that needs this to initialize | 413 // origin because it creates a RenderFrameProxy that needs this to initialize |
| 414 // its security context. This origin will also be sent to RenderFrameProxies | 414 // its security context. This origin will also be sent to RenderFrameProxies |
| 415 // created via ViewMsg_New and FrameMsg_NewFrameProxy. | 415 // created via ViewMsg_New and FrameMsg_NewFrameProxy. |
| 416 render_frame_host->frame_tree_node()->set_current_origin(params.origin); | 416 render_frame_host->frame_tree_node()->SetCurrentOrigin(params.origin); |
| 417 | 417 |
| 418 // When using --site-per-process, we notify the RFHM for all navigations, | 418 // When using --site-per-process, we notify the RFHM for all navigations, |
| 419 // not just main frame navigations. | 419 // not just main frame navigations. |
| 420 if (use_site_per_process) { | 420 if (use_site_per_process) { |
| 421 FrameTreeNode* frame = render_frame_host->frame_tree_node(); | 421 FrameTreeNode* frame = render_frame_host->frame_tree_node(); |
| 422 frame->render_manager()->DidNavigateFrame( | 422 frame->render_manager()->DidNavigateFrame( |
| 423 render_frame_host, params.gesture == NavigationGestureUser); | 423 render_frame_host, params.gesture == NavigationGestureUser); |
| 424 } | 424 } |
| 425 | 425 |
| 426 // Update the site of the SiteInstance if it doesn't have one yet, unless | 426 // Update the site of the SiteInstance if it doesn't have one yet, unless |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 887 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
| 888 time_to_commit); | 888 time_to_commit); |
| 889 UMA_HISTOGRAM_TIMES( | 889 UMA_HISTOGRAM_TIMES( |
| 890 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 890 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
| 891 time_to_network); | 891 time_to_network); |
| 892 } | 892 } |
| 893 navigation_data_.reset(); | 893 navigation_data_.reset(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 } // namespace content | 896 } // namespace content |
| OLD | NEW |