| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
| 6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 8 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 9 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 10 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 12 #include "third_party/WebKit/public/platform/WebURLLoader.h" |
| 11 | 13 |
| 14 class GURL; |
| 15 |
| 12 namespace webkit_glue { | 16 namespace webkit_glue { |
| 13 struct ResourceResponseInfo; | 17 struct ResourceResponseInfo; |
| 14 } | 18 } |
| 15 | 19 |
| 16 namespace content { | 20 namespace content { |
| 17 | 21 |
| 22 // Extracts the information from a data scheme URL. Exported only for testing. |
| 23 CONTENT_EXPORT bool GetInfoFromDataURL(const GURL& url, |
| 24 webkit_glue::ResourceResponseInfo* info, |
| 25 std::string* data, |
| 26 int* error_code); |
| 27 |
| 18 class WebURLLoaderImpl : public blink::WebURLLoader { | 28 class WebURLLoaderImpl : public blink::WebURLLoader { |
| 19 public: | 29 public: |
| 20 WebURLLoaderImpl(); | 30 WebURLLoaderImpl(); |
| 21 virtual ~WebURLLoaderImpl(); | 31 virtual ~WebURLLoaderImpl(); |
| 22 | 32 |
| 23 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url, | 33 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url, |
| 24 bool stale_copy_in_cache, | 34 bool stale_copy_in_cache, |
| 25 int reason); | 35 int reason); |
| 26 CONTENT_EXPORT static void PopulateURLResponse( | 36 CONTENT_EXPORT static void PopulateURLResponse( |
| 27 const GURL& url, | 37 const GURL& url, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 43 int intra_priority_value); | 53 int intra_priority_value); |
| 44 | 54 |
| 45 private: | 55 private: |
| 46 class Context; | 56 class Context; |
| 47 scoped_refptr<Context> context_; | 57 scoped_refptr<Context> context_; |
| 48 }; | 58 }; |
| 49 | 59 |
| 50 } // namespace content | 60 } // namespace content |
| 51 | 61 |
| 52 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 62 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
| OLD | NEW |