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

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

Issue 2561983002: NavigationController: Reload methods migration (Closed)
Patch Set: android build fix Created 4 years 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
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 NavigationEntryImpl::FromNavigationEntry(std::move(entry))); 257 NavigationEntryImpl::FromNavigationEntry(std::move(entry)));
258 258
259 // At this point, the |entries| is full of empty scoped_ptrs, so it can be 259 // At this point, the |entries| is full of empty scoped_ptrs, so it can be
260 // cleared out safely. 260 // cleared out safely.
261 entries->clear(); 261 entries->clear();
262 262
263 // And finish the restore. 263 // And finish the restore.
264 FinishRestore(selected_navigation, type); 264 FinishRestore(selected_navigation, type);
265 } 265 }
266 266
267 void NavigationControllerImpl::Reload(bool check_for_repost) {
268 Reload(check_for_repost, ReloadType::NORMAL);
269 }
270 void NavigationControllerImpl::ReloadBypassingCache(bool check_for_repost) {
271 Reload(check_for_repost, ReloadType::BYPASSING_CACHE);
272 }
273 void NavigationControllerImpl::ReloadOriginalRequestURL(bool check_for_repost) {
274 Reload(check_for_repost, ReloadType::ORIGINAL_REQUEST_URL);
275 }
276 void NavigationControllerImpl::ReloadDisableLoFi(bool check_for_repost) {
277 Reload(check_for_repost, ReloadType::DISABLE_LOFI_MODE);
278 }
279
280 void NavigationControllerImpl::Reload(bool check_for_repost, 267 void NavigationControllerImpl::Reload(bool check_for_repost,
281 ReloadType reload_type) { 268 ReloadType reload_type) {
282 if (transient_entry_index_ != -1) { 269 if (transient_entry_index_ != -1) {
283 // If an interstitial is showing, treat a reload as a navigation to the 270 // If an interstitial is showing, treat a reload as a navigation to the
284 // transient entry's URL. 271 // transient entry's URL.
285 NavigationEntryImpl* transient_entry = GetTransientEntry(); 272 NavigationEntryImpl* transient_entry = GetTransientEntry();
286 if (!transient_entry) 273 if (!transient_entry)
287 return; 274 return;
288 LoadURL(transient_entry->GetURL(), 275 LoadURL(transient_entry->GetURL(),
289 Referrer(), 276 Referrer(),
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 } 2064 }
2078 } 2065 }
2079 } 2066 }
2080 2067
2081 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 2068 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
2082 const base::Callback<base::Time()>& get_timestamp_callback) { 2069 const base::Callback<base::Time()>& get_timestamp_callback) {
2083 get_timestamp_callback_ = get_timestamp_callback; 2070 get_timestamp_callback_ = get_timestamp_callback;
2084 } 2071 }
2085 2072
2086 } // namespace content 2073 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698