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

Side by Side Diff: content/public/test/navigation_simulator.cc

Issue 2691423006: Introduce the ThrottleManager (Closed)
Patch Set: rebase 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/public/test/navigation_simulator.h" 5 #include "content/public/test/navigation_simulator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "content/browser/frame_host/navigation_handle_impl.h" 10 #include "content/browser/frame_host/navigation_handle_impl.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 throttle_checks_wait_closure_.Run(); 544 throttle_checks_wait_closure_.Run();
545 } 545 }
546 546
547 void NavigationSimulator::PrepareCompleteCallbackOnHandle() { 547 void NavigationSimulator::PrepareCompleteCallbackOnHandle() {
548 last_throttle_check_result_.reset(); 548 last_throttle_check_result_.reset();
549 handle_->set_complete_callback_for_testing( 549 handle_->set_complete_callback_for_testing(
550 base::Bind(&NavigationSimulator::OnThrottleChecksComplete, 550 base::Bind(&NavigationSimulator::OnThrottleChecksComplete,
551 weak_factory_.GetWeakPtr())); 551 weak_factory_.GetWeakPtr()));
552 } 552 }
553 553
554 RenderFrameHost* NavigationSimulator::GetFinalRenderFrameHost() {
555 CHECK_EQ(state_, FINISHED);
556 return render_frame_host_;
557 }
558
554 } // namespace content 559 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698