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

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

Issue 2321543002: Merge CrossSiteResourceHandler and NavigationResourceThrottle (Closed)
Patch Set: Fixed test compilation error Created 4 years, 3 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
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 #include "content/browser/frame_host/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 lofi_state, navigation_start), 398 lofi_state, navigation_start),
399 entry.ConstructStartNavigationParams(), 399 entry.ConstructStartNavigationParams(),
400 entry.ConstructRequestNavigationParams( 400 entry.ConstructRequestNavigationParams(
401 frame_entry, is_same_document_history_load, 401 frame_entry, is_same_document_history_load,
402 is_history_navigation_in_new_child, 402 is_history_navigation_in_new_child,
403 frame_tree_node->has_committed_real_load(), 403 frame_tree_node->has_committed_real_load(),
404 controller_->GetPendingEntryIndex() == -1, 404 controller_->GetPendingEntryIndex() == -1,
405 controller_->GetIndexOfEntry(&entry), 405 controller_->GetIndexOfEntry(&entry),
406 controller_->GetLastCommittedEntryIndex(), 406 controller_->GetLastCommittedEntryIndex(),
407 controller_->GetEntryCount())); 407 controller_->GetEntryCount()));
408 } else {
409 // No need to navigate again. Just resume the deferred request.
nasko 2016/09/08 23:45:39 Why do we not need this anymore?
clamy 2016/09/09 15:06:41 Because if we transfer to self, we won't pause the
410 dest_render_frame_host->GetProcess()->ResumeDeferredNavigation(
411 entry.transferred_global_request_id());
412 } 408 }
413 } 409 }
414 410
415 // Make sure no code called via RFH::Navigate clears the pending entry. 411 // Make sure no code called via RFH::Navigate clears the pending entry.
416 if (is_pending_entry) 412 if (is_pending_entry)
417 CHECK_EQ(controller_->GetPendingEntry(), &entry); 413 CHECK_EQ(controller_->GetPendingEntry(), &entry);
418 414
419 if (controller_->GetPendingEntryIndex() == -1 && 415 if (controller_->GetPendingEntryIndex() == -1 &&
420 dest_url.SchemeIs(url::kJavaScriptScheme)) { 416 dest_url.SchemeIs(url::kJavaScriptScheme)) {
421 // If the pending entry index is -1 (which means a new navigation rather 417 // If the pending entry index is -1 (which means a new navigation rather
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 if (pending_entry != controller_->GetVisibleEntry() || 1205 if (pending_entry != controller_->GetVisibleEntry() ||
1210 !should_preserve_entry) { 1206 !should_preserve_entry) {
1211 controller_->DiscardPendingEntry(true); 1207 controller_->DiscardPendingEntry(true);
1212 1208
1213 // Also force the UI to refresh. 1209 // Also force the UI to refresh.
1214 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1210 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1215 } 1211 }
1216 } 1212 }
1217 1213
1218 } // namespace content 1214 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698