| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const ResourceResponseInfo& info, | 46 const ResourceResponseInfo& info, |
| 47 blink::WebURLResponse* response, | 47 blink::WebURLResponse* response, |
| 48 bool report_security_info); | 48 bool report_security_info); |
| 49 static void PopulateURLRequestForRedirect( | 49 static void PopulateURLRequestForRedirect( |
| 50 const blink::WebURLRequest& request, | 50 const blink::WebURLRequest& request, |
| 51 const net::RedirectInfo& redirect_info, | 51 const net::RedirectInfo& redirect_info, |
| 52 blink::WebReferrerPolicy referrer_policy, | 52 blink::WebReferrerPolicy referrer_policy, |
| 53 bool skip_service_worker, | 53 bool skip_service_worker, |
| 54 blink::WebURLRequest* new_request); | 54 blink::WebURLRequest* new_request); |
| 55 | 55 |
| 56 // We can optimize the handling of data URLs in most cases. |
| 57 static bool CanHandleDataURLRequestLocally( |
| 58 const blink::WebURLRequest&, |
| 59 bool resource_dispatcher_exists); |
| 60 |
| 56 // WebURLLoader methods: | 61 // WebURLLoader methods: |
| 57 void loadSynchronously( | 62 void loadSynchronously( |
| 58 const blink::WebURLRequest& request, | 63 const blink::WebURLRequest& request, |
| 59 blink::WebURLResponse& response, | 64 blink::WebURLResponse& response, |
| 60 blink::WebURLError& error, | 65 blink::WebURLError& error, |
| 61 blink::WebData& data) override; | 66 blink::WebData& data) override; |
| 62 void loadAsynchronously( | 67 void loadAsynchronously( |
| 63 const blink::WebURLRequest& request, | 68 const blink::WebURLRequest& request, |
| 64 blink::WebURLLoaderClient* client) override; | 69 blink::WebURLLoaderClient* client) override; |
| 65 void cancel() override; | 70 void cancel() override; |
| 66 void setDefersLoading(bool value) override; | 71 void setDefersLoading(bool value) override; |
| 67 void didChangePriority(blink::WebURLRequest::Priority new_priority, | 72 void didChangePriority(blink::WebURLRequest::Priority new_priority, |
| 68 int intra_priority_value) override; | 73 int intra_priority_value) override; |
| 69 bool attachThreadedDataReceiver( | 74 bool attachThreadedDataReceiver( |
| 70 blink::WebThreadedDataReceiver* threaded_data_receiver) override; | 75 blink::WebThreadedDataReceiver* threaded_data_receiver) override; |
| 71 void setLoadingTaskRunner(blink::WebTaskRunner* loading_task_runner) override; | 76 void setLoadingTaskRunner(blink::WebTaskRunner* loading_task_runner) override; |
| 72 | 77 |
| 73 private: | 78 private: |
| 74 class Context; | 79 class Context; |
| 75 class RequestPeerImpl; | 80 class RequestPeerImpl; |
| 76 scoped_refptr<Context> context_; | 81 scoped_refptr<Context> context_; |
| 77 | 82 |
| 78 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); | 83 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); |
| 79 }; | 84 }; |
| 80 | 85 |
| 81 } // namespace content | 86 } // namespace content |
| 82 | 87 |
| 83 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 88 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
| OLD | NEW |