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/tab_contents/navigation_controller_impl.h" | 5 #include "content/browser/tab_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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 temp.append("_"); | 775 temp.append("_"); |
776 if (entries_[i]->site_instance()) | 776 if (entries_[i]->site_instance()) |
777 temp.append(base::IntToString(entries_[i]->site_instance()->GetId())); | 777 temp.append(base::IntToString(entries_[i]->site_instance()->GetId())); |
778 else | 778 else |
779 temp.append("N"); | 779 temp.append("N"); |
780 if (entries_[i]->site_instance() != tab_contents_->GetSiteInstance()) | 780 if (entries_[i]->site_instance() != tab_contents_->GetSiteInstance()) |
781 temp.append("x"); | 781 temp.append("x"); |
782 temp.append(","); | 782 temp.append(","); |
783 } | 783 } |
784 GURL url(temp); | 784 GURL url(temp); |
785 tab_contents_->GetRenderViewHost()->Send(new ViewMsg_TempCrashWithData(url))
; | 785 static_cast<RenderViewHostImpl*>( |
| 786 tab_contents_->GetRenderViewHost())->Send( |
| 787 new ViewMsg_TempCrashWithData(url)); |
786 return content::NAVIGATION_TYPE_NAV_IGNORE; | 788 return content::NAVIGATION_TYPE_NAV_IGNORE; |
787 } | 789 } |
788 NavigationEntryImpl* existing_entry = entries_[existing_entry_index].get(); | 790 NavigationEntryImpl* existing_entry = entries_[existing_entry_index].get(); |
789 | 791 |
790 if (!content::PageTransitionIsMainFrame(params.transition)) { | 792 if (!content::PageTransitionIsMainFrame(params.transition)) { |
791 // All manual subframes would get new IDs and were handled above, so we | 793 // All manual subframes would get new IDs and were handled above, so we |
792 // know this is auto. Since the current page was found in the navigation | 794 // know this is auto. Since the current page was found in the navigation |
793 // entry list, we're guaranteed to have a last committed entry. | 795 // entry list, we're guaranteed to have a last committed entry. |
794 DCHECK(GetLastCommittedEntry()); | 796 DCHECK(GetLastCommittedEntry()); |
795 return content::NAVIGATION_TYPE_AUTO_SUBFRAME; | 797 return content::NAVIGATION_TYPE_AUTO_SUBFRAME; |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 for (int i = 0; i < max_index; i++) { | 1428 for (int i = 0; i < max_index; i++) { |
1427 // When cloning a tab, copy all entries except interstitial pages | 1429 // When cloning a tab, copy all entries except interstitial pages |
1428 if (source.entries_[i].get()->GetPageType() != | 1430 if (source.entries_[i].get()->GetPageType() != |
1429 content::PAGE_TYPE_INTERSTITIAL) { | 1431 content::PAGE_TYPE_INTERSTITIAL) { |
1430 entries_.insert(entries_.begin() + insert_index++, | 1432 entries_.insert(entries_.begin() + insert_index++, |
1431 linked_ptr<NavigationEntryImpl>( | 1433 linked_ptr<NavigationEntryImpl>( |
1432 new NavigationEntryImpl(*source.entries_[i]))); | 1434 new NavigationEntryImpl(*source.entries_[i]))); |
1433 } | 1435 } |
1434 } | 1436 } |
1435 } | 1437 } |
OLD | NEW |