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

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: Save old transient entry; update URL. Created 7 years, 11 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 3fdc752bbe11cb2f1920ecb36a9b2033ab2eb087..da0a5eb4a3fedeec98aee1d4238c1c612a9a598c 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -723,18 +723,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,
@@ -1737,6 +1725,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) {

Powered by Google App Engine
This is Rietveld 408576698