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

Unified Diff: content/browser/web_contents/navigation_controller_impl.cc

Issue 12001002: InstantExtended: Transient naventry for preview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/navigation_controller_impl.cc
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index 3fd2122937abdfb2a51f6dd84a152c07e4b2f0e0..6dfd23e10823b9f64bc393bf766e9768d18c90be 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -735,18 +735,6 @@ void NavigationControllerImpl::UpdateVirtualURLToURL(
}
}
-void NavigationControllerImpl::AddTransientEntry(NavigationEntryImpl* entry) {
- // Discard any current transient entry, we can only have one at a time.
- int index = 0;
- if (last_committed_entry_index_ != -1)
- index = last_committed_entry_index_ + 1;
- DiscardTransientEntry();
- entries_.insert(
- entries_.begin() + index, linked_ptr<NavigationEntryImpl>(entry));
- transient_entry_index_ = index;
- web_contents_->NotifyNavigationStateChanged(kInvalidateAll);
-}
-
void NavigationControllerImpl::LoadURL(
const GURL& url,
const Referrer& referrer,
@@ -1759,6 +1747,19 @@ NavigationEntry* NavigationControllerImpl::GetTransientEntry() const {
return entries_[transient_entry_index_].get();
}
+void NavigationControllerImpl::AddTransientEntry(NavigationEntry* entry) {
+ // Discard any current transient entry, we can only have one at a time.
+ int index = 0;
+ if (last_committed_entry_index_ != -1)
+ index = last_committed_entry_index_ + 1;
+ DiscardTransientEntry();
+ entries_.insert(
+ entries_.begin() + index, linked_ptr<NavigationEntryImpl>(
+ NavigationEntryImpl::FromNavigationEntry(entry)));
+ transient_entry_index_ = index;
+ web_contents_->NotifyNavigationStateChanged(kInvalidateAll);
+}
+
void NavigationControllerImpl::InsertEntriesFrom(
const NavigationControllerImpl& source,
int max_index) {
« no previous file with comments | « content/browser/web_contents/navigation_controller_impl.h ('k') | content/public/browser/navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698