OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 } | 1465 } |
1466 last_committed_entry_index_ = entry_index; | 1466 last_committed_entry_index_ = entry_index; |
1467 DiscardNonCommittedEntriesInternal(); | 1467 DiscardNonCommittedEntriesInternal(); |
1468 return true; | 1468 return true; |
1469 } | 1469 } |
1470 | 1470 |
1471 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1471 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1472 switches::kSitePerProcess)) { | 1472 switches::kSitePerProcess)) { |
1473 // This may be a "new auto" case where we add a new FrameNavigationEntry, or | 1473 // This may be a "new auto" case where we add a new FrameNavigationEntry, or |
1474 // it may be a "history auto" case where we update an existing one. | 1474 // it may be a "history auto" case where we update an existing one. |
1475 int frame_tree_node_id = rfh->frame_tree_node()->frame_tree_node_id(); | |
1476 NavigationEntryImpl* last_committed = GetLastCommittedEntry(); | 1475 NavigationEntryImpl* last_committed = GetLastCommittedEntry(); |
1477 last_committed->AddOrUpdateFrameEntry(frame_tree_node_id, | 1476 last_committed->AddOrUpdateFrameEntry(rfh->frame_tree_node(), |
1478 rfh->GetSiteInstance(), | 1477 rfh->GetSiteInstance(), params.url, |
1479 params.url, | |
1480 params.referrer); | 1478 params.referrer); |
1481 } | 1479 } |
1482 | 1480 |
1483 // We do not need to discard the pending entry in this case, since we will | 1481 // We do not need to discard the pending entry in this case, since we will |
1484 // not generate commit notifications for this auto-subframe navigation. | 1482 // not generate commit notifications for this auto-subframe navigation. |
1485 return false; | 1483 return false; |
1486 } | 1484 } |
1487 | 1485 |
1488 int NavigationControllerImpl::GetIndexOfEntry( | 1486 int NavigationControllerImpl::GetIndexOfEntry( |
1489 const NavigationEntryImpl* entry) const { | 1487 const NavigationEntryImpl* entry) const { |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2018 } | 2016 } |
2019 } | 2017 } |
2020 } | 2018 } |
2021 | 2019 |
2022 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2020 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2023 const base::Callback<base::Time()>& get_timestamp_callback) { | 2021 const base::Callback<base::Time()>& get_timestamp_callback) { |
2024 get_timestamp_callback_ = get_timestamp_callback; | 2022 get_timestamp_callback_ = get_timestamp_callback; |
2025 } | 2023 } |
2026 | 2024 |
2027 } // namespace content | 2025 } // namespace content |
OLD | NEW |