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

Side by Side Diff: content/child/web_url_loader_impl.h

Issue 54233002: Make net::DataURL's MIME string check stricter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CONTENT_EXPORT Created 6 years, 8 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 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 14 matching lines...) Expand all
42 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority); 52 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority);
43 53
44 private: 54 private:
45 class Context; 55 class Context;
46 scoped_refptr<Context> context_; 56 scoped_refptr<Context> context_;
47 }; 57 };
48 58
49 } // namespace content 59 } // namespace content
50 60
51 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ 61 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698