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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 | 612 |
613 // When using --site-per-process, we notify the RFHM for all navigations, | 613 // When using --site-per-process, we notify the RFHM for all navigations, |
614 // not just main frame navigations. | 614 // not just main frame navigations. |
615 if (oopifs_possible) { | 615 if (oopifs_possible) { |
616 FrameTreeNode* frame = render_frame_host->frame_tree_node(); | 616 FrameTreeNode* frame = render_frame_host->frame_tree_node(); |
617 frame->render_manager()->DidNavigateFrame( | 617 frame->render_manager()->DidNavigateFrame( |
618 render_frame_host, params.gesture == NavigationGestureUser); | 618 render_frame_host, params.gesture == NavigationGestureUser); |
619 } | 619 } |
620 | 620 |
621 // Update the site of the SiteInstance if it doesn't have one yet, unless | 621 // Update the site of the SiteInstance if it doesn't have one yet, unless |
622 // assigning a site is not necessary for this URL. In that case, the | 622 // assigning a site is not necessary for this URL or the commit was for an |
623 // SiteInstance can still be considered unused until a navigation to a real | 623 // error page. In that case, the SiteInstance can still be considered unused |
624 // page. | 624 // until a navigation to a real page. |
625 SiteInstanceImpl* site_instance = render_frame_host->GetSiteInstance(); | 625 SiteInstanceImpl* site_instance = render_frame_host->GetSiteInstance(); |
626 if (!site_instance->HasSite() && | 626 if (!site_instance->HasSite() && ShouldAssignSiteForURL(params.url) && |
627 ShouldAssignSiteForURL(params.url)) { | 627 !params.url_is_unreachable) { |
628 site_instance->SetSite(params.url); | 628 site_instance->SetSite(params.url); |
629 } | 629 } |
630 | 630 |
631 // Need to update MIME type here because it's referred to in | 631 // Need to update MIME type here because it's referred to in |
632 // UpdateNavigationCommands() called by RendererDidNavigate() to | 632 // UpdateNavigationCommands() called by RendererDidNavigate() to |
633 // determine whether or not to enable the encoding menu. | 633 // determine whether or not to enable the encoding menu. |
634 // It's updated only for the main frame. For a subframe, | 634 // It's updated only for the main frame. For a subframe, |
635 // RenderView::UpdateURL does not set params.contents_mime_type. | 635 // RenderView::UpdateURL does not set params.contents_mime_type. |
636 // (see http://code.google.com/p/chromium/issues/detail?id=2929 ) | 636 // (see http://code.google.com/p/chromium/issues/detail?id=2929 ) |
637 // TODO(jungshik): Add a test for the encoding menu to avoid | 637 // TODO(jungshik): Add a test for the encoding menu to avoid |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 if (navigation_handle) | 1286 if (navigation_handle) |
1287 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1287 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
1288 | 1288 |
1289 controller_->SetPendingEntry(std::move(entry)); | 1289 controller_->SetPendingEntry(std::move(entry)); |
1290 if (delegate_) | 1290 if (delegate_) |
1291 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1291 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
1292 } | 1292 } |
1293 } | 1293 } |
1294 | 1294 |
1295 } // namespace content | 1295 } // namespace content |
OLD | NEW |