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

Side by Side Diff: content/test/test_navigation_url_loader.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: 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
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/test/test_navigation_url_loader.h" 5 #include "content/test/test_navigation_url_loader.h"
6 6
7 #include "content/browser/loader/navigation_url_loader_delegate.h" 7 #include "content/browser/loader/navigation_url_loader_delegate.h"
8 #include "content/public/browser/stream_handle.h" 8 #include "content/public/browser/stream_handle.h"
9 #include "content/public/common/resource_response.h" 9 #include "content/public/common/resource_response.h"
10 #include "net/url_request/redirect_info.h" 10 #include "net/url_request/redirect_info.h"
(...skipping 22 matching lines...) Expand all
33 CallOnRequestRedirected(redirect_info, response); 33 CallOnRequestRedirected(redirect_info, response);
34 } 34 }
35 35
36 void TestNavigationURLLoader::SimulateError(int error_code) { 36 void TestNavigationURLLoader::SimulateError(int error_code) {
37 delegate_->OnRequestFailed(false, error_code); 37 delegate_->OnRequestFailed(false, error_code);
38 } 38 }
39 39
40 void TestNavigationURLLoader::CallOnRequestRedirected( 40 void TestNavigationURLLoader::CallOnRequestRedirected(
41 const net::RedirectInfo& redirect_info, 41 const net::RedirectInfo& redirect_info,
42 const scoped_refptr<ResourceResponse>& response) { 42 const scoped_refptr<ResourceResponse>& response) {
43 delegate_->OnRequestRedirected(redirect_info, response); 43 delegate_->OnRequestRedirected(redirect_info, response, false);
44 } 44 }
45 45
46 void TestNavigationURLLoader::CallOnResponseStarted( 46 void TestNavigationURLLoader::CallOnResponseStarted(
47 const scoped_refptr<ResourceResponse>& response, 47 const scoped_refptr<ResourceResponse>& response,
48 scoped_ptr<StreamHandle> body) { 48 scoped_ptr<StreamHandle> body) {
49 delegate_->OnResponseStarted(response, body.Pass()); 49 delegate_->OnResponseStarted(response, body.Pass());
50 } 50 }
51 51
52 TestNavigationURLLoader::~TestNavigationURLLoader() {} 52 TestNavigationURLLoader::~TestNavigationURLLoader() {}
53 53
54 } // namespace content 54 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698