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

Side by Side Diff: content/test/test_navigation_handle.cc

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Rebase Created 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/test/test_navigation_handle.h"
6
7 namespace content {
8 TestNavigationHandle::~TestNavigationHandle() {}
9
10 // static
11 TestNavigationHandle* TestNavigationHandle::Create(
12 const GURL& url,
13 const GURL& validated_url,
14 const bool is_main_frame,
15 NavigatorDelegate* delegate) {
16 return new TestNavigationHandle(url, validated_url, is_main_frame, delegate);
17 }
18
19 NavigationThrottle::ThrottleCheckResult
20 TestNavigationHandle::SimulateWillStartRequest(
21 bool is_post,
22 const Referrer& sanitized_referrer,
23 bool has_user_gesture,
24 ui::PageTransition transition,
25 bool is_external_protocol) {
26 return WillStartRequest(is_post, sanitized_referrer, has_user_gesture,
27 transition, is_external_protocol);
28 }
29
30 NavigationThrottle::ThrottleCheckResult
31 TestNavigationHandle::SimulateWillRedirectRequest(
32 const GURL& new_url,
33 const GURL& new_validated_url,
34 bool new_method_is_post,
35 const GURL& new_referrer_url,
36 bool new_is_external_protocol) {
37 return WillRedirectRequest(new_url, new_validated_url, new_method_is_post,
38 new_referrer_url, new_is_external_protocol);
39 }
40
41 TestNavigationHandle::TestNavigationHandle(const GURL& url,
42 const GURL& validated_url,
43 const bool is_main_frame,
44 NavigatorDelegate* delegate)
45 : NavigationHandleImpl(url, validated_url, is_main_frame, delegate) {}
46 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698