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

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

Issue 692973005: Pass origin information for remote frame creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 // Run tasks that must execute just before the commit. 513 // Run tasks that must execute just before the commit.
514 bool is_navigation_within_page = controller_->IsURLInPageNavigation( 514 bool is_navigation_within_page = controller_->IsURLInPageNavigation(
515 params.url, params.was_within_same_page, render_frame_host); 515 params.url, params.was_within_same_page, render_frame_host);
516 delegate_->DidNavigateMainFramePreCommit(is_navigation_within_page); 516 delegate_->DidNavigateMainFramePreCommit(is_navigation_within_page);
517 } 517 }
518 518
519 if (!use_site_per_process) 519 if (!use_site_per_process)
520 frame_tree->root()->render_manager()->DidNavigateFrame(render_frame_host); 520 frame_tree->root()->render_manager()->DidNavigateFrame(render_frame_host);
521 } 521 }
522 522
523 // OOPIF: Save the origin of the new page here, so that it is available to
Charlie Reis 2014/11/13 18:00:57 nit: Remove "OOPIF." This looks like it happens i
alexmos 2014/11/18 18:25:32 Done.
524 // send as part of FrameMsg_SwapOut, which will result in a new remote frame
Charlie Reis 2014/11/13 18:00:57 Can we split this in two sentences, or rephrase it
alexmos 2014/11/18 18:25:32 Rephrased. Please let me know if this makes more
525 // that needs this to initialize its security context. This origin will also
526 // be sent to remote frames created via ViewMsg_New and
527 // FrameMsg_NewFrameProxy.
528 render_frame_host->frame_tree_node()->SetOriginFromURL(params.url);
Charlie Reis 2014/11/13 18:00:57 Would it be easier to just do this action inside t
alexmos 2014/11/18 18:25:32 That would be too late because we need the origin
Charlie Reis 2014/11/19 00:46:17 Good question. As we chatted about in person, I t
529
523 // When using --site-per-process, we notify the RFHM for all navigations, 530 // When using --site-per-process, we notify the RFHM for all navigations,
524 // not just main frame navigations. 531 // not just main frame navigations.
525 if (use_site_per_process) { 532 if (use_site_per_process) {
526 FrameTreeNode* frame = render_frame_host->frame_tree_node(); 533 FrameTreeNode* frame = render_frame_host->frame_tree_node();
527 frame->render_manager()->DidNavigateFrame(render_frame_host); 534 frame->render_manager()->DidNavigateFrame(render_frame_host);
528 } 535 }
529 536
530 // Update the site of the SiteInstance if it doesn't have one yet, unless 537 // Update the site of the SiteInstance if it doesn't have one yet, unless
531 // assigning a site is not necessary for this URL. In that case, the 538 // assigning a site is not necessary for this URL. In that case, the
532 // SiteInstance can still be considered unused until a navigation to a real 539 // SiteInstance can still be considered unused until a navigation to a real
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", 923 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted",
917 time_to_commit); 924 time_to_commit);
918 UMA_HISTOGRAM_TIMES( 925 UMA_HISTOGRAM_TIMES(
919 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", 926 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted",
920 time_to_network); 927 time_to_network);
921 } 928 }
922 navigation_data_.reset(); 929 navigation_data_.reset();
923 } 930 }
924 931
925 } // namespace content 932 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698