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

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

Issue 1797363002: "Top Document Isolation" mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Two new browsertests. Created 4 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 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 <utility> 7 #include <utility>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 render_frame_host, params.gesture == NavigationGestureUser); 495 render_frame_host, params.gesture == NavigationGestureUser);
496 } 496 }
497 497
498 // Update the site of the SiteInstance if it doesn't have one yet, unless 498 // Update the site of the SiteInstance if it doesn't have one yet, unless
499 // assigning a site is not necessary for this URL. In that case, the 499 // assigning a site is not necessary for this URL. In that case, the
500 // SiteInstance can still be considered unused until a navigation to a real 500 // SiteInstance can still be considered unused until a navigation to a real
501 // page. 501 // page.
502 SiteInstanceImpl* site_instance = render_frame_host->GetSiteInstance(); 502 SiteInstanceImpl* site_instance = render_frame_host->GetSiteInstance();
503 if (!site_instance->HasSite() && 503 if (!site_instance->HasSite() &&
504 ShouldAssignSiteForURL(params.url)) { 504 ShouldAssignSiteForURL(params.url)) {
505 // TODO(nick): Is it ever necessary to set the third_party_subframe bit
506 // here?
505 site_instance->SetSite(params.url); 507 site_instance->SetSite(params.url);
506 } 508 }
507 509
508 // Need to update MIME type here because it's referred to in 510 // Need to update MIME type here because it's referred to in
509 // UpdateNavigationCommands() called by RendererDidNavigate() to 511 // UpdateNavigationCommands() called by RendererDidNavigate() to
510 // determine whether or not to enable the encoding menu. 512 // determine whether or not to enable the encoding menu.
511 // It's updated only for the main frame. For a subframe, 513 // It's updated only for the main frame. For a subframe,
512 // RenderView::UpdateURL does not set params.contents_mime_type. 514 // RenderView::UpdateURL does not set params.contents_mime_type.
513 // (see http://code.google.com/p/chromium/issues/detail?id=2929 ) 515 // (see http://code.google.com/p/chromium/issues/detail?id=2929 )
514 // TODO(jungshik): Add a test for the encoding menu to avoid 516 // TODO(jungshik): Add a test for the encoding menu to avoid
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 if (pending_entry != controller_->GetVisibleEntry() || 1133 if (pending_entry != controller_->GetVisibleEntry() ||
1132 !should_preserve_entry) { 1134 !should_preserve_entry) {
1133 controller_->DiscardPendingEntry(true); 1135 controller_->DiscardPendingEntry(true);
1134 1136
1135 // Also force the UI to refresh. 1137 // Also force the UI to refresh.
1136 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1138 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1137 } 1139 }
1138 } 1140 }
1139 1141
1140 } // namespace content 1142 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698