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

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

Issue 9342007: Add HTTP PUT request type to content:URLFetcher (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_url_fetcher_factory.h" 5 #include "content/test/test_url_fetcher_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void TestURLFetcher::SetReferrer(const std::string& referrer) { 70 void TestURLFetcher::SetReferrer(const std::string& referrer) {
71 } 71 }
72 72
73 void TestURLFetcher::SetExtraRequestHeaders( 73 void TestURLFetcher::SetExtraRequestHeaders(
74 const std::string& extra_request_headers) { 74 const std::string& extra_request_headers) {
75 fake_extra_request_headers_.Clear(); 75 fake_extra_request_headers_.Clear();
76 fake_extra_request_headers_.AddHeadersFromString(extra_request_headers); 76 fake_extra_request_headers_.AddHeadersFromString(extra_request_headers);
77 } 77 }
78 78
79 void TestURLFetcher::AddRequestHeaderFromString(
80 const base::StringPiece& header_line) {
81 fake_extra_request_headers_.AddHeaderFromString(header_line);
82 }
83
79 void TestURLFetcher::GetExtraRequestHeaders(net::HttpRequestHeaders* headers) { 84 void TestURLFetcher::GetExtraRequestHeaders(net::HttpRequestHeaders* headers) {
80 *headers = fake_extra_request_headers_; 85 *headers = fake_extra_request_headers_;
81 } 86 }
82 87
83 void TestURLFetcher::SetRequestContext( 88 void TestURLFetcher::SetRequestContext(
84 net::URLRequestContextGetter* request_context_getter) { 89 net::URLRequestContextGetter* request_context_getter) {
85 } 90 }
86 91
87 void TestURLFetcher::SetAutomaticallyRetryOn5xx(bool retry) { 92 void TestURLFetcher::SetAutomaticallyRetryOn5xx(bool retry) {
88 } 93 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 321
317 URLFetcherImplFactory::~URLFetcherImplFactory() {} 322 URLFetcherImplFactory::~URLFetcherImplFactory() {}
318 323
319 content::URLFetcher* URLFetcherImplFactory::CreateURLFetcher( 324 content::URLFetcher* URLFetcherImplFactory::CreateURLFetcher(
320 int id, 325 int id,
321 const GURL& url, 326 const GURL& url,
322 content::URLFetcher::RequestType request_type, 327 content::URLFetcher::RequestType request_type,
323 content::URLFetcherDelegate* d) { 328 content::URLFetcherDelegate* d) {
324 return new URLFetcherImpl(url, request_type, d); 329 return new URLFetcherImpl(url, request_type, d);
325 } 330 }
OLDNEW
« content/public/common/url_fetcher.h ('K') | « content/test/test_url_fetcher_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698