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 content { | 16 namespace content { |
13 | 17 |
14 struct ResourceResponseInfo; | 18 struct ResourceResponseInfo; |
15 | 19 |
| 20 // Extracts the information from a data scheme URL. Returns an error code. |
| 21 // Exported only for testing. |
| 22 CONTENT_EXPORT int GetInfoFromDataURL(const GURL& url, |
| 23 ResourceResponseInfo* info, |
| 24 std::string* data); |
| 25 |
16 class WebURLLoaderImpl : public blink::WebURLLoader { | 26 class WebURLLoaderImpl : public blink::WebURLLoader { |
17 public: | 27 public: |
18 WebURLLoaderImpl(); | 28 WebURLLoaderImpl(); |
19 virtual ~WebURLLoaderImpl(); | 29 virtual ~WebURLLoaderImpl(); |
20 | 30 |
21 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url, | 31 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url, |
22 bool stale_copy_in_cache, | 32 bool stale_copy_in_cache, |
23 int reason); | 33 int reason); |
24 CONTENT_EXPORT static void PopulateURLResponse( | 34 CONTENT_EXPORT static void PopulateURLResponse( |
25 const GURL& url, | 35 const GURL& url, |
(...skipping 15 matching lines...) Expand all Loading... |
41 int intra_priority_value); | 51 int intra_priority_value); |
42 | 52 |
43 private: | 53 private: |
44 class Context; | 54 class Context; |
45 scoped_refptr<Context> context_; | 55 scoped_refptr<Context> context_; |
46 }; | 56 }; |
47 | 57 |
48 } // namespace content | 58 } // namespace content |
49 | 59 |
50 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 60 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
OLD | NEW |