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

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

Issue 1098763003: Send origin updates to frame proxies when a frame navigates to new origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Charlie's nits Created 5 years, 8 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/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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 frame_tree->root()->render_manager()->DidNavigateFrame( 407 frame_tree->root()->render_manager()->DidNavigateFrame(
408 render_frame_host, params.gesture == NavigationGestureUser); 408 render_frame_host, params.gesture == NavigationGestureUser);
409 } 409 }
410 410
411 // Save the origin of the new page. Do this before calling 411 // Save the origin of the new page. Do this before calling
412 // DidNavigateFrame(), because the origin needs to be included in the SwapOut 412 // DidNavigateFrame(), because the origin needs to be included in the SwapOut
413 // message, which is sent inside DidNavigateFrame(). SwapOut needs the 413 // message, which is sent inside DidNavigateFrame(). SwapOut needs the
414 // origin because it creates a RenderFrameProxy that needs this to initialize 414 // origin because it creates a RenderFrameProxy that needs this to initialize
415 // its security context. This origin will also be sent to RenderFrameProxies 415 // its security context. This origin will also be sent to RenderFrameProxies
416 // created via ViewMsg_New and FrameMsg_NewFrameProxy. 416 // created via ViewMsg_New and FrameMsg_NewFrameProxy.
417 render_frame_host->frame_tree_node()->set_current_origin(params.origin); 417 render_frame_host->frame_tree_node()->SetCurrentOrigin(params.origin);
418 418
419 // When using --site-per-process, we notify the RFHM for all navigations, 419 // When using --site-per-process, we notify the RFHM for all navigations,
420 // not just main frame navigations. 420 // not just main frame navigations.
421 if (use_site_per_process) { 421 if (use_site_per_process) {
422 FrameTreeNode* frame = render_frame_host->frame_tree_node(); 422 FrameTreeNode* frame = render_frame_host->frame_tree_node();
423 frame->render_manager()->DidNavigateFrame( 423 frame->render_manager()->DidNavigateFrame(
424 render_frame_host, params.gesture == NavigationGestureUser); 424 render_frame_host, params.gesture == NavigationGestureUser);
425 } 425 }
426 426
427 // Update the site of the SiteInstance if it doesn't have one yet, unless 427 // Update the site of the SiteInstance if it doesn't have one yet, unless
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698