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

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

Issue 1304373007: Browser test for LoadDataWithBaseURL reload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more clean ups Created 5 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 // Whether or not a page transition was triggered by going backward or 486 // Whether or not a page transition was triggered by going backward or
487 // forward in the history is only stored in the navigation controller's 487 // forward in the history is only stored in the navigation controller's
488 // entry list. 488 // entry list.
489 if (did_navigate && 489 if (did_navigate &&
490 (controller_->GetLastCommittedEntry()->GetTransitionType() & 490 (controller_->GetLastCommittedEntry()->GetTransitionType() &
491 ui::PAGE_TRANSITION_FORWARD_BACK)) { 491 ui::PAGE_TRANSITION_FORWARD_BACK)) {
492 transition_type = ui::PageTransitionFromInt( 492 transition_type = ui::PageTransitionFromInt(
493 params.transition | ui::PAGE_TRANSITION_FORWARD_BACK); 493 params.transition | ui::PAGE_TRANSITION_FORWARD_BACK);
494 } 494 }
495 495
496 delegate_->DidCommitProvisionalLoad(render_frame_host, 496 NavigationEntryImpl* entry = controller_->GetLastCommittedEntry();
Charlie Reis 2015/11/20 21:30:12 I'm a little concerned about this particular chang
boliu 2015/11/23 22:32:25 Moved this change to extensions/browser/guest_view
Charlie Reis 2015/11/24 00:22:59 Much better-- thanks!
497 params.url, 497 bool use_virtual_url = entry->GetVirtualURL().is_valid() &&
Charlie Reis 2015/11/20 21:30:12 This condition is kind of a no-op, because GetVirt
498 entry->GetBaseURLForDataURL().is_valid() &&
499 entry->GetURL().SchemeIs(url::kDataScheme);
500 GURL url = use_virtual_url ? entry->GetVirtualURL() : params.url;
501 delegate_->DidCommitProvisionalLoad(render_frame_host, url,
498 transition_type); 502 transition_type);
499 render_frame_host->navigation_handle()->DidCommitNavigation( 503 render_frame_host->navigation_handle()->DidCommitNavigation(
500 is_navigation_within_page, render_frame_host); 504 is_navigation_within_page, render_frame_host);
501 render_frame_host->SetNavigationHandle(nullptr); 505 render_frame_host->SetNavigationHandle(nullptr);
502 } 506 }
503 507
504 if (!did_navigate) 508 if (!did_navigate)
505 return; // No navigation happened. 509 return; // No navigation happened.
506 510
507 // DO NOT ADD MORE STUFF TO THIS FUNCTION! Your component should either listen 511 // DO NOT ADD MORE STUFF TO THIS FUNCTION! Your component should either listen
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 964 entry->set_should_replace_entry(pending_entry->should_replace_entry());
961 entry->SetRedirectChain(pending_entry->GetRedirectChain()); 965 entry->SetRedirectChain(pending_entry->GetRedirectChain());
962 } 966 }
963 controller_->SetPendingEntry(entry.Pass()); 967 controller_->SetPendingEntry(entry.Pass());
964 if (delegate_) 968 if (delegate_)
965 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 969 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
966 } 970 }
967 } 971 }
968 972
969 } // namespace content 973 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698