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

Side by Side Diff: content/browser/frame_host/navigation_handle_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/navigation_handle_impl.h" 5 #include "content/browser/frame_host/navigation_handle_impl.h"
6 6
7 #include <utility>
8
7 #include "content/browser/frame_host/frame_tree_node.h" 9 #include "content/browser/frame_host/frame_tree_node.h"
8 #include "content/browser/frame_host/navigator.h" 10 #include "content/browser/frame_host/navigator.h"
9 #include "content/browser/frame_host/navigator_delegate.h" 11 #include "content/browser/frame_host/navigator_delegate.h"
10 #include "content/browser/service_worker/service_worker_context_wrapper.h" 12 #include "content/browser/service_worker/service_worker_context_wrapper.h"
11 #include "content/browser/service_worker/service_worker_navigation_handle.h" 13 #include "content/browser/service_worker/service_worker_navigation_handle.h"
12 #include "content/public/browser/content_browser_client.h" 14 #include "content/public/browser/content_browser_client.h"
13 #include "content/public/common/browser_side_navigation_policy.h" 15 #include "content/public/common/browser_side_navigation_policy.h"
14 #include "content/public/common/content_client.h" 16 #include "content/public/common/content_client.h"
15 #include "net/url_request/redirect_info.h" 17 #include "net/url_request/redirect_info.h"
16 18
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 NavigationThrottle::ThrottleCheckResult result) { 163 NavigationThrottle::ThrottleCheckResult result) {
162 DCHECK(state_ == DEFERRING_START || state_ == DEFERRING_REDIRECT); 164 DCHECK(state_ == DEFERRING_START || state_ == DEFERRING_REDIRECT);
163 DCHECK(result == NavigationThrottle::CANCEL_AND_IGNORE || 165 DCHECK(result == NavigationThrottle::CANCEL_AND_IGNORE ||
164 result == NavigationThrottle::CANCEL); 166 result == NavigationThrottle::CANCEL);
165 state_ = CANCELING; 167 state_ = CANCELING;
166 RunCompleteCallback(result); 168 RunCompleteCallback(result);
167 } 169 }
168 170
169 void NavigationHandleImpl::RegisterThrottleForTesting( 171 void NavigationHandleImpl::RegisterThrottleForTesting(
170 scoped_ptr<NavigationThrottle> navigation_throttle) { 172 scoped_ptr<NavigationThrottle> navigation_throttle) {
171 throttles_.push_back(navigation_throttle.Pass()); 173 throttles_.push_back(std::move(navigation_throttle));
172 } 174 }
173 175
174 NavigationThrottle::ThrottleCheckResult 176 NavigationThrottle::ThrottleCheckResult
175 NavigationHandleImpl::CallWillStartRequestForTesting( 177 NavigationHandleImpl::CallWillStartRequestForTesting(
176 bool is_post, 178 bool is_post,
177 const Referrer& sanitized_referrer, 179 const Referrer& sanitized_referrer,
178 bool has_user_gesture, 180 bool has_user_gesture,
179 ui::PageTransition transition, 181 ui::PageTransition transition,
180 bool is_external_protocol) { 182 bool is_external_protocol) {
181 NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER; 183 NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 void NavigationHandleImpl::RunCompleteCallback( 370 void NavigationHandleImpl::RunCompleteCallback(
369 NavigationThrottle::ThrottleCheckResult result) { 371 NavigationThrottle::ThrottleCheckResult result) {
370 DCHECK(result != NavigationThrottle::DEFER); 372 DCHECK(result != NavigationThrottle::DEFER);
371 if (!complete_callback_.is_null()) 373 if (!complete_callback_.is_null())
372 complete_callback_.Run(result); 374 complete_callback_.Run(result);
373 375
374 complete_callback_.Reset(); 376 complete_callback_.Reset();
375 } 377 }
376 378
377 } // namespace content 379 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.cc ('k') | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698