Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2740843004: Add DCHECK that Reload should never be called with ReloadType::NONE (Closed)
Patch Set: Swapped arguments order in DCHECK_NE Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/public/browser/navigation_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(ReloadType::NONE, reload_type);
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
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
OLDNEW
« no previous file with comments | « no previous file | content/public/browser/navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698