OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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.h" | 5 #include "content/browser/tab_contents/navigation_controller.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_util.h" | 9 #include "base/string_util.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 // | 578 // |
579 // TODO(brettw) write a test for this complicated logic. | 579 // TODO(brettw) write a test for this complicated logic. |
580 details->is_auto = (PageTransition::IsRedirect(params.transition) && | 580 details->is_auto = (PageTransition::IsRedirect(params.transition) && |
581 !pending_entry()) || | 581 !pending_entry()) || |
582 params.gesture == NavigationGestureAuto; | 582 params.gesture == NavigationGestureAuto; |
583 | 583 |
584 // Now prep the rest of the details for the notification and broadcast. | 584 // Now prep the rest of the details for the notification and broadcast. |
585 details->entry = active_entry; | 585 details->entry = active_entry; |
586 details->is_main_frame = PageTransition::IsMainFrame(params.transition); | 586 details->is_main_frame = PageTransition::IsMainFrame(params.transition); |
587 details->serialized_security_info = params.security_info; | 587 details->serialized_security_info = params.security_info; |
588 details->is_content_filtered = params.is_content_filtered; | |
589 details->http_status_code = params.http_status_code; | 588 details->http_status_code = params.http_status_code; |
590 NotifyNavigationEntryCommitted(details, extra_invalidate_flags); | 589 NotifyNavigationEntryCommitted(details, extra_invalidate_flags); |
591 | 590 |
592 return true; | 591 return true; |
593 } | 592 } |
594 | 593 |
595 NavigationType::Type NavigationController::ClassifyNavigation( | 594 NavigationType::Type NavigationController::ClassifyNavigation( |
596 const ViewHostMsg_FrameNavigate_Params& params) const { | 595 const ViewHostMsg_FrameNavigate_Params& params) const { |
597 if (params.page_id == -1) { | 596 if (params.page_id == -1) { |
598 // The renderer generates the page IDs, and so if it gives us the invalid | 597 // The renderer generates the page IDs, and so if it gives us the invalid |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 size_t insert_index = 0; | 1195 size_t insert_index = 0; |
1197 for (int i = 0; i < max_index; i++) { | 1196 for (int i = 0; i < max_index; i++) { |
1198 // When cloning a tab, copy all entries except interstitial pages | 1197 // When cloning a tab, copy all entries except interstitial pages |
1199 if (source.entries_[i].get()->page_type() != INTERSTITIAL_PAGE) { | 1198 if (source.entries_[i].get()->page_type() != INTERSTITIAL_PAGE) { |
1200 entries_.insert(entries_.begin() + insert_index++, | 1199 entries_.insert(entries_.begin() + insert_index++, |
1201 linked_ptr<NavigationEntry>( | 1200 linked_ptr<NavigationEntry>( |
1202 new NavigationEntry(*source.entries_[i]))); | 1201 new NavigationEntry(*source.entries_[i]))); |
1203 } | 1202 } |
1204 } | 1203 } |
1205 } | 1204 } |
OLD | NEW |