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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 if (entry_index != last_committed_entry_index_) { | 1316 if (entry_index != last_committed_entry_index_) { |
1317 last_committed_entry_index_ = entry_index; | 1317 last_committed_entry_index_ = entry_index; |
1318 DiscardNonCommittedEntriesInternal(); | 1318 DiscardNonCommittedEntriesInternal(); |
1319 return true; | 1319 return true; |
1320 } | 1320 } |
1321 | 1321 |
1322 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1322 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1323 switches::kSitePerProcess)) { | 1323 switches::kSitePerProcess)) { |
1324 // This may be a "new auto" case where we add a new FrameNavigationEntry, or | 1324 // This may be a "new auto" case where we add a new FrameNavigationEntry, or |
1325 // it may be a "history auto" case where we update an existing one. | 1325 // it may be a "history auto" case where we update an existing one. |
1326 int64 frame_tree_node_id = rfh->frame_tree_node()->frame_tree_node_id(); | 1326 int frame_tree_node_id = rfh->frame_tree_node()->frame_tree_node_id(); |
1327 NavigationEntryImpl* last_committed = GetLastCommittedEntry(); | 1327 NavigationEntryImpl* last_committed = GetLastCommittedEntry(); |
1328 last_committed->AddOrUpdateFrameEntry(frame_tree_node_id, | 1328 last_committed->AddOrUpdateFrameEntry(frame_tree_node_id, |
1329 rfh->GetSiteInstance(), | 1329 rfh->GetSiteInstance(), |
1330 params.url, | 1330 params.url, |
1331 params.referrer); | 1331 params.referrer); |
1332 } | 1332 } |
1333 | 1333 |
1334 // We do not need to discard the pending entry in this case, since we will | 1334 // We do not need to discard the pending entry in this case, since we will |
1335 // not generate commit notifications for this auto-subframe navigation. | 1335 // not generate commit notifications for this auto-subframe navigation. |
1336 return false; | 1336 return false; |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 } | 1860 } |
1861 } | 1861 } |
1862 } | 1862 } |
1863 | 1863 |
1864 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1864 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
1865 const base::Callback<base::Time()>& get_timestamp_callback) { | 1865 const base::Callback<base::Time()>& get_timestamp_callback) { |
1866 get_timestamp_callback_ = get_timestamp_callback; | 1866 get_timestamp_callback_ = get_timestamp_callback; |
1867 } | 1867 } |
1868 | 1868 |
1869 } // namespace content | 1869 } // namespace content |
OLD | NEW |