| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/navigation_controller_impl.h" | 5 #include "content/browser/web_contents/navigation_controller_impl.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_number_conversions.h" // Temporary | 9 #include "base/string_number_conversions.h" // Temporary |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 const base::Time timestamp = base::Time::Now(); | 751 const base::Time timestamp = base::Time::Now(); |
| 752 DVLOG(1) << "Navigation finished at timestamp " | 752 DVLOG(1) << "Navigation finished at timestamp " |
| 753 << timestamp.ToInternalValue(); | 753 << timestamp.ToInternalValue(); |
| 754 | 754 |
| 755 // All committed entries should have nonempty content state so WebKit doesn't | 755 // All committed entries should have nonempty content state so WebKit doesn't |
| 756 // get confused when we go back to them (see the function for details). | 756 // get confused when we go back to them (see the function for details). |
| 757 DCHECK(!params.content_state.empty()); | 757 DCHECK(!params.content_state.empty()); |
| 758 NavigationEntryImpl* active_entry = | 758 NavigationEntryImpl* active_entry = |
| 759 NavigationEntryImpl::FromNavigationEntry(GetActiveEntry()); | 759 NavigationEntryImpl::FromNavigationEntry(GetActiveEntry()); |
| 760 active_entry->SetTimestamp(timestamp); | 760 active_entry->SetTimestamp(timestamp); |
| 761 active_entry->SetHttpStatusCode(params.http_status_code); |
| 761 active_entry->SetContentState(params.content_state); | 762 active_entry->SetContentState(params.content_state); |
| 762 // No longer needed since content state will hold the post data if any. | 763 // No longer needed since content state will hold the post data if any. |
| 763 active_entry->SetBrowserInitiatedPostData(NULL); | 764 active_entry->SetBrowserInitiatedPostData(NULL); |
| 764 | 765 |
| 765 | 766 |
| 766 // Once committed, we do not need to track if the entry was initiated by | 767 // Once committed, we do not need to track if the entry was initiated by |
| 767 // the renderer. | 768 // the renderer. |
| 768 active_entry->set_is_renderer_initiated(false); | 769 active_entry->set_is_renderer_initiated(false); |
| 769 | 770 |
| 770 // The active entry's SiteInstance should match our SiteInstance. | 771 // The active entry's SiteInstance should match our SiteInstance. |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 for (int i = 0; i < max_index; i++) { | 1589 for (int i = 0; i < max_index; i++) { |
| 1589 // When cloning a tab, copy all entries except interstitial pages | 1590 // When cloning a tab, copy all entries except interstitial pages |
| 1590 if (source.entries_[i].get()->GetPageType() != | 1591 if (source.entries_[i].get()->GetPageType() != |
| 1591 content::PAGE_TYPE_INTERSTITIAL) { | 1592 content::PAGE_TYPE_INTERSTITIAL) { |
| 1592 entries_.insert(entries_.begin() + insert_index++, | 1593 entries_.insert(entries_.begin() + insert_index++, |
| 1593 linked_ptr<NavigationEntryImpl>( | 1594 linked_ptr<NavigationEntryImpl>( |
| 1594 new NavigationEntryImpl(*source.entries_[i]))); | 1595 new NavigationEntryImpl(*source.entries_[i]))); |
| 1595 } | 1596 } |
| 1596 } | 1597 } |
| 1597 } | 1598 } |
| OLD | NEW |