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

Side by Side Diff: content/child/npapi/plugin_url_fetcher.cc

Issue 207603003: Extract RequestInfo struct from ResourceLoaderBridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 6 years, 9 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
« no previous file with comments | « content/child/child_thread.cc ('k') | content/child/request_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "content/child/npapi/plugin_url_fetcher.h" 5 #include "content/child/npapi/plugin_url_fetcher.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "content/child/child_thread.h" 8 #include "content/child/child_thread.h"
9 #include "content/child/npapi/plugin_host.h" 9 #include "content/child/npapi/plugin_host.h"
10 #include "content/child/npapi/plugin_instance.h" 10 #include "content/child/npapi/plugin_instance.h"
11 #include "content/child/npapi/plugin_stream_url.h" 11 #include "content/child/npapi/plugin_stream_url.h"
12 #include "content/child/npapi/webplugin.h" 12 #include "content/child/npapi/webplugin.h"
13 #include "content/child/npapi/webplugin_resource_client.h" 13 #include "content/child/npapi/webplugin_resource_client.h"
14 #include "content/child/plugin_messages.h" 14 #include "content/child/plugin_messages.h"
15 #include "content/child/request_extra_data.h" 15 #include "content/child/request_extra_data.h"
16 #include "content/child/request_info.h"
16 #include "content/child/resource_dispatcher.h" 17 #include "content/child/resource_dispatcher.h"
17 #include "content/child/web_url_loader_impl.h" 18 #include "content/child/web_url_loader_impl.h"
18 #include "content/common/resource_request_body.h" 19 #include "content/common/resource_request_body.h"
19 #include "content/common/service_worker/service_worker_types.h" 20 #include "content/common/service_worker/service_worker_types.h"
20 #include "net/base/load_flags.h" 21 #include "net/base/load_flags.h"
21 #include "net/base/net_errors.h" 22 #include "net/base/net_errors.h"
22 #include "net/http/http_response_headers.h" 23 #include "net/http/http_response_headers.h"
23 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" 24 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
24 #include "third_party/WebKit/public/platform/WebURLResponse.h" 25 #include "third_party/WebKit/public/platform/WebURLResponse.h"
25 #include "webkit/child/multipart_response_delegate.h" 26 #include "webkit/child/multipart_response_delegate.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 url_(url), 91 url_(url),
91 first_party_for_cookies_(first_party_for_cookies), 92 first_party_for_cookies_(first_party_for_cookies),
92 method_(method), 93 method_(method),
93 referrer_(referrer), 94 referrer_(referrer),
94 notify_redirects_(notify_redirects), 95 notify_redirects_(notify_redirects),
95 is_plugin_src_load_(is_plugin_src_load), 96 is_plugin_src_load_(is_plugin_src_load),
96 resource_id_(resource_id), 97 resource_id_(resource_id),
97 copy_stream_data_(copy_stream_data), 98 copy_stream_data_(copy_stream_data),
98 data_offset_(0), 99 data_offset_(0),
99 pending_failure_notification_(false) { 100 pending_failure_notification_(false) {
100 webkit_glue::ResourceLoaderBridge::RequestInfo request_info; 101 RequestInfo request_info;
101 request_info.method = method; 102 request_info.method = method;
102 request_info.url = url; 103 request_info.url = url;
103 request_info.first_party_for_cookies = first_party_for_cookies; 104 request_info.first_party_for_cookies = first_party_for_cookies;
104 request_info.referrer = referrer; 105 request_info.referrer = referrer;
105 request_info.load_flags = net::LOAD_NORMAL; 106 request_info.load_flags = net::LOAD_NORMAL;
106 request_info.requestor_pid = origin_pid; 107 request_info.requestor_pid = origin_pid;
107 request_info.request_type = ResourceType::OBJECT; 108 request_info.request_type = ResourceType::OBJECT;
108 request_info.routing_id = render_view_id; 109 request_info.routing_id = render_view_id;
109 110
110 RequestExtraData extra_data(blink::WebPageVisibilityStateVisible, 111 RequestExtraData extra_data(blink::WebPageVisibilityStateVisible,
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 353 }
353 354
354 if (error_code == net::OK) { 355 if (error_code == net::OK) {
355 plugin_stream_->DidFinishLoading(resource_id_); 356 plugin_stream_->DidFinishLoading(resource_id_);
356 } else { 357 } else {
357 plugin_stream_->DidFail(resource_id_); 358 plugin_stream_->DidFail(resource_id_);
358 } 359 }
359 } 360 }
360 361
361 } // namespace content 362 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_thread.cc ('k') | content/child/request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698