Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
| 6 | 6 |
| 7 #include "webkit/glue/weburlloader_impl.h" | 7 #include "webkit/glue/weburlloader_impl.h" |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 case WebURLRequest::TargetIsWorker: | 132 case WebURLRequest::TargetIsWorker: |
| 133 return ResourceType::WORKER; | 133 return ResourceType::WORKER; |
| 134 case WebURLRequest::TargetIsSharedWorker: | 134 case WebURLRequest::TargetIsSharedWorker: |
| 135 return ResourceType::SHARED_WORKER; | 135 return ResourceType::SHARED_WORKER; |
| 136 case WebURLRequest::TargetIsPrefetch: | 136 case WebURLRequest::TargetIsPrefetch: |
| 137 return ResourceType::PREFETCH; | 137 return ResourceType::PREFETCH; |
| 138 case WebURLRequest::TargetIsPrerender: | 138 case WebURLRequest::TargetIsPrerender: |
| 139 return ResourceType::PRERENDER; | 139 return ResourceType::PRERENDER; |
| 140 case WebURLRequest::TargetIsFavicon: | 140 case WebURLRequest::TargetIsFavicon: |
| 141 return ResourceType::FAVICON; | 141 return ResourceType::FAVICON; |
| 142 // TODO(jochen): replace with WebURLRequest::TargetIsXHR and remove the | |
| 143 // #pragma as soon as WebKit side has landed. | |
| 144 #if defined(OS_WIN) | |
|
darin (slow to review)
2011/08/02 19:32:08
the way we typically accomplish this is with an #i
| |
| 145 #pragma warning(push) | |
| 146 #pragma warning(disable : 4063) | |
| 147 #endif | |
| 148 case 14: | |
| 149 return ResourceType::XHR; | |
| 150 #if defined(OS_WIN) | |
| 151 #pragma warning(pop) | |
| 152 #endif | |
| 142 default: | 153 default: |
| 143 NOTREACHED(); | 154 NOTREACHED(); |
| 144 return ResourceType::SUB_RESOURCE; | 155 return ResourceType::SUB_RESOURCE; |
| 145 } | 156 } |
| 146 } | 157 } |
| 147 | 158 |
| 148 // Extracts the information from a data: url. | 159 // Extracts the information from a data: url. |
| 149 bool GetInfoFromDataURL(const GURL& url, | 160 bool GetInfoFromDataURL(const GURL& url, |
| 150 ResourceResponseInfo* info, | 161 ResourceResponseInfo* info, |
| 151 std::string* data, | 162 std::string* data, |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 756 | 767 |
| 757 void WebURLLoaderImpl::cancel() { | 768 void WebURLLoaderImpl::cancel() { |
| 758 context_->Cancel(); | 769 context_->Cancel(); |
| 759 } | 770 } |
| 760 | 771 |
| 761 void WebURLLoaderImpl::setDefersLoading(bool value) { | 772 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 762 context_->SetDefersLoading(value); | 773 context_->SetDefersLoading(value); |
| 763 } | 774 } |
| 764 | 775 |
| 765 } // namespace webkit_glue | 776 } // namespace webkit_glue |
| OLD | NEW |