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

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

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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>
8
7 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
8 #include "base/time/time.h" 10 #include "base/time/time.h"
9 #include "content/browser/frame_host/frame_tree.h" 11 #include "content/browser/frame_host/frame_tree.h"
10 #include "content/browser/frame_host/frame_tree_node.h" 12 #include "content/browser/frame_host/frame_tree_node.h"
11 #include "content/browser/frame_host/navigation_controller_impl.h" 13 #include "content/browser/frame_host/navigation_controller_impl.h"
12 #include "content/browser/frame_host/navigation_entry_impl.h" 14 #include "content/browser/frame_host/navigation_entry_impl.h"
13 #include "content/browser/frame_host/navigation_handle_impl.h" 15 #include "content/browser/frame_host/navigation_handle_impl.h"
14 #include "content/browser/frame_host/navigation_request.h" 16 #include "content/browser/frame_host/navigation_request.h"
15 #include "content/browser/frame_host/navigation_request_info.h" 17 #include "content/browser/frame_host/navigation_request_info.h"
16 #include "content/browser/frame_host/navigator_delegate.h" 18 #include "content/browser/frame_host/navigator_delegate.h"
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 new ViewMsg_EnableViewSourceMode( 804 new ViewMsg_EnableViewSourceMode(
803 render_frame_host->render_view_host()->GetRoutingID())); 805 render_frame_host->render_view_host()->GetRoutingID()));
804 } 806 }
805 807
806 CheckWebUIRendererDoesNotDisplayNormalURL( 808 CheckWebUIRendererDoesNotDisplayNormalURL(
807 render_frame_host, navigation_request->common_params().url); 809 render_frame_host, navigation_request->common_params().url);
808 810
809 navigation_request->TransferNavigationHandleOwnership(render_frame_host); 811 navigation_request->TransferNavigationHandleOwnership(render_frame_host);
810 render_frame_host->navigation_handle()->ReadyToCommitNavigation( 812 render_frame_host->navigation_handle()->ReadyToCommitNavigation(
811 render_frame_host, response ? response->head.headers : nullptr); 813 render_frame_host, response ? response->head.headers : nullptr);
812 render_frame_host->CommitNavigation(response, body.Pass(), 814 render_frame_host->CommitNavigation(response, std::move(body),
813 navigation_request->common_params(), 815 navigation_request->common_params(),
814 navigation_request->request_params()); 816 navigation_request->request_params());
815
816 } 817 }
817 818
818 // PlzNavigate 819 // PlzNavigate
819 void NavigatorImpl::FailedNavigation(FrameTreeNode* frame_tree_node, 820 void NavigatorImpl::FailedNavigation(FrameTreeNode* frame_tree_node,
820 bool has_stale_copy_in_cache, 821 bool has_stale_copy_in_cache,
821 int error_code) { 822 int error_code) {
822 CHECK(IsBrowserSideNavigationEnabled()); 823 CHECK(IsBrowserSideNavigationEnabled());
823 824
824 NavigationRequest* navigation_request = frame_tree_node->navigation_request(); 825 NavigationRequest* navigation_request = frame_tree_node->navigation_request();
825 DCHECK(navigation_request); 826 DCHECK(navigation_request);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 controller_->GetBrowserContext())); 1007 controller_->GetBrowserContext()));
1007 entry->set_site_instance(site_instance); 1008 entry->set_site_instance(site_instance);
1008 // TODO(creis): If there's a pending entry already, find a safe way to 1009 // TODO(creis): If there's a pending entry already, find a safe way to
1009 // update it instead of replacing it and copying over things like this. 1010 // update it instead of replacing it and copying over things like this.
1010 if (pending_entry) { 1011 if (pending_entry) {
1011 entry->set_transferred_global_request_id( 1012 entry->set_transferred_global_request_id(
1012 pending_entry->transferred_global_request_id()); 1013 pending_entry->transferred_global_request_id());
1013 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 1014 entry->set_should_replace_entry(pending_entry->should_replace_entry());
1014 entry->SetRedirectChain(pending_entry->GetRedirectChain()); 1015 entry->SetRedirectChain(pending_entry->GetRedirectChain());
1015 } 1016 }
1016 controller_->SetPendingEntry(entry.Pass()); 1017 controller_->SetPendingEntry(std::move(entry));
1017 if (delegate_) 1018 if (delegate_)
1018 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1019 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1019 } 1020 }
1020 } 1021 }
1021 1022
1022 } // namespace content 1023 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698