| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/tab_contents/navigation_controller.h" | 5 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 // The URL may have changed due to redirects. The site instance will normally | 667 // The URL may have changed due to redirects. The site instance will normally |
| 668 // be the same except during session restore, when no site instance will be | 668 // be the same except during session restore, when no site instance will be |
| 669 // assigned. | 669 // assigned. |
| 670 entry->set_url(params.url); | 670 entry->set_url(params.url); |
| 671 if (entry->update_virtual_url_with_url()) | 671 if (entry->update_virtual_url_with_url()) |
| 672 UpdateVirtualURLToURL(entry, params.url); | 672 UpdateVirtualURLToURL(entry, params.url); |
| 673 DCHECK(entry->site_instance() == NULL || | 673 DCHECK(entry->site_instance() == NULL || |
| 674 entry->site_instance() == tab_contents_->GetSiteInstance()); | 674 entry->site_instance() == tab_contents_->GetSiteInstance()); |
| 675 entry->set_site_instance(tab_contents_->GetSiteInstance()); | 675 entry->set_site_instance(tab_contents_->GetSiteInstance()); |
| 676 | 676 |
| 677 entry->set_has_post_data(params.is_post); |
| 678 |
| 677 // The entry we found in the list might be pending if the user hit | 679 // The entry we found in the list might be pending if the user hit |
| 678 // back/forward/reload. This load should commit it (since it's already in the | 680 // back/forward/reload. This load should commit it (since it's already in the |
| 679 // list, we can just discard the pending pointer). | 681 // list, we can just discard the pending pointer). |
| 680 // | 682 // |
| 681 // Note that we need to use the "internal" version since we don't want to | 683 // Note that we need to use the "internal" version since we don't want to |
| 682 // actually change any other state, just kill the pointer. | 684 // actually change any other state, just kill the pointer. |
| 683 if (entry == pending_entry_) | 685 if (entry == pending_entry_) |
| 684 DiscardNonCommittedEntriesInternal(); | 686 DiscardNonCommittedEntriesInternal(); |
| 685 | 687 |
| 686 // If a transient entry was removed, the indices might have changed, so we | 688 // If a transient entry was removed, the indices might have changed, so we |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 return i; | 1022 return i; |
| 1021 } | 1023 } |
| 1022 return -1; | 1024 return -1; |
| 1023 } | 1025 } |
| 1024 | 1026 |
| 1025 NavigationEntry* NavigationController::GetTransientEntry() const { | 1027 NavigationEntry* NavigationController::GetTransientEntry() const { |
| 1026 if (transient_entry_index_ == -1) | 1028 if (transient_entry_index_ == -1) |
| 1027 return NULL; | 1029 return NULL; |
| 1028 return entries_[transient_entry_index_].get(); | 1030 return entries_[transient_entry_index_].get(); |
| 1029 } | 1031 } |
| OLD | NEW |