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 /* | 5 /* |
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * | 10 * |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 // At this point, the |entries| is full of empty scoped_ptrs, so it can be | 290 // At this point, the |entries| is full of empty scoped_ptrs, so it can be |
291 // cleared out safely. | 291 // cleared out safely. |
292 entries->clear(); | 292 entries->clear(); |
293 | 293 |
294 // And finish the restore. | 294 // And finish the restore. |
295 FinishRestore(selected_navigation, type); | 295 FinishRestore(selected_navigation, type); |
296 } | 296 } |
297 | 297 |
298 void NavigationControllerImpl::Reload(ReloadType reload_type, | 298 void NavigationControllerImpl::Reload(ReloadType reload_type, |
299 bool check_for_repost) { | 299 bool check_for_repost) { |
300 DCHECK_NE(reload_type, ReloadType::NONE); | |
Charlie Reis
2017/03/10 17:41:05
Minor nit: Swap order of arguments. (DCHECK macro
liaoyuke
2017/03/10 18:00:14
Done.
| |
301 | |
300 if (transient_entry_index_ != -1) { | 302 if (transient_entry_index_ != -1) { |
301 // If an interstitial is showing, treat a reload as a navigation to the | 303 // If an interstitial is showing, treat a reload as a navigation to the |
302 // transient entry's URL. | 304 // transient entry's URL. |
303 NavigationEntryImpl* transient_entry = GetTransientEntry(); | 305 NavigationEntryImpl* transient_entry = GetTransientEntry(); |
304 if (!transient_entry) | 306 if (!transient_entry) |
305 return; | 307 return; |
306 LoadURL(transient_entry->GetURL(), | 308 LoadURL(transient_entry->GetURL(), |
307 Referrer(), | 309 Referrer(), |
308 ui::PAGE_TRANSITION_RELOAD, | 310 ui::PAGE_TRANSITION_RELOAD, |
309 transient_entry->extra_headers()); | 311 transient_entry->extra_headers()); |
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2150 } | 2152 } |
2151 } | 2153 } |
2152 } | 2154 } |
2153 | 2155 |
2154 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2156 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2155 const base::Callback<base::Time()>& get_timestamp_callback) { | 2157 const base::Callback<base::Time()>& get_timestamp_callback) { |
2156 get_timestamp_callback_ = get_timestamp_callback; | 2158 get_timestamp_callback_ = get_timestamp_callback; |
2157 } | 2159 } |
2158 | 2160 |
2159 } // namespace content | 2161 } // namespace content |
OLD | NEW |