Delete chrome.mediaGalleriesPrivate because the functionality unique to it has since...
[chromium-blink-merge.git] / content / test / test_navigation_url_loader.cc
blobb95ea89fbc824619fc3f1686e53019c2c91698ab
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
3 // found in the LICENSE file.
5 #include "content/test/test_navigation_url_loader.h"
7 #include "content/browser/loader/navigation_url_loader_delegate.h"
8 #include "content/public/browser/stream_handle.h"
10 namespace content {
12 TestNavigationURLLoader::TestNavigationURLLoader(
13 const CommonNavigationParams& common_params,
14 scoped_ptr<NavigationRequestInfo> request_info,
15 NavigationURLLoaderDelegate* delegate)
16 : common_params_(common_params),
17 request_info_(request_info.Pass()),
18 delegate_(delegate),
19 redirect_count_(0) {
22 void TestNavigationURLLoader::FollowRedirect() {
23 redirect_count_++;
26 void TestNavigationURLLoader::CallOnRequestRedirected(
27 const net::RedirectInfo& redirect_info,
28 const scoped_refptr<ResourceResponse>& response) {
29 delegate_->OnRequestRedirected(redirect_info, response);
32 void TestNavigationURLLoader::CallOnResponseStarted(
33 const scoped_refptr<ResourceResponse>& response,
34 scoped_ptr<StreamHandle> body) {
35 delegate_->OnResponseStarted(response, body.Pass());
38 TestNavigationURLLoader::~TestNavigationURLLoader() {}
40 } // namespace content