| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "net/url_request/url_request.h" | 5 #include "net/url_request/url_request.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/metrics/stats_counters.h" | 9 #include "base/metrics/stats_counters.h" |
| 10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // Origin). | 37 // Origin). |
| 38 void StripPostSpecificHeaders(net::HttpRequestHeaders* headers) { | 38 void StripPostSpecificHeaders(net::HttpRequestHeaders* headers) { |
| 39 // These are headers that may be attached to a POST. | 39 // These are headers that may be attached to a POST. |
| 40 headers->RemoveHeader(net::HttpRequestHeaders::kContentLength); | 40 headers->RemoveHeader(net::HttpRequestHeaders::kContentLength); |
| 41 headers->RemoveHeader(net::HttpRequestHeaders::kContentType); | 41 headers->RemoveHeader(net::HttpRequestHeaders::kContentType); |
| 42 headers->RemoveHeader(net::HttpRequestHeaders::kOrigin); | 42 headers->RemoveHeader(net::HttpRequestHeaders::kOrigin); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 namespace net { |
| 48 |
| 47 /////////////////////////////////////////////////////////////////////////////// | 49 /////////////////////////////////////////////////////////////////////////////// |
| 48 // URLRequest::Interceptor | 50 // URLRequest::Interceptor |
| 49 | 51 |
| 50 URLRequestJob* URLRequest::Interceptor::MaybeInterceptRedirect( | 52 URLRequestJob* URLRequest::Interceptor::MaybeInterceptRedirect( |
| 51 URLRequest* request, | 53 URLRequest* request, |
| 52 const GURL& location) { | 54 const GURL& location) { |
| 53 return NULL; | 55 return NULL; |
| 54 } | 56 } |
| 55 | 57 |
| 56 URLRequestJob* URLRequest::Interceptor::MaybeInterceptResponse( | 58 URLRequestJob* URLRequest::Interceptor::MaybeInterceptResponse( |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 URLRequest::UserData* URLRequest::GetUserData(const void* key) const { | 593 URLRequest::UserData* URLRequest::GetUserData(const void* key) const { |
| 592 UserDataMap::const_iterator found = user_data_.find(key); | 594 UserDataMap::const_iterator found = user_data_.find(key); |
| 593 if (found != user_data_.end()) | 595 if (found != user_data_.end()) |
| 594 return found->second.get(); | 596 return found->second.get(); |
| 595 return NULL; | 597 return NULL; |
| 596 } | 598 } |
| 597 | 599 |
| 598 void URLRequest::SetUserData(const void* key, UserData* data) { | 600 void URLRequest::SetUserData(const void* key, UserData* data) { |
| 599 user_data_[key] = linked_ptr<UserData>(data); | 601 user_data_[key] = linked_ptr<UserData>(data); |
| 600 } | 602 } |
| 603 |
| 604 } // namespace net |
| OLD | NEW |