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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 953793003: Ensuring interception of stream get determined by plugin path before checking mime type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits. Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 27 matching lines...) Expand all
38 #include "content/public/browser/notification_types.h" 38 #include "content/public/browser/notification_types.h"
39 #include "content/public/browser/resource_dispatcher_host.h" 39 #include "content/public/browser/resource_dispatcher_host.h"
40 #include "content/public/common/resource_type.h" 40 #include "content/public/common/resource_type.h"
41 #include "ipc/ipc_message.h" 41 #include "ipc/ipc_message.h"
42 #include "net/cookies/canonical_cookie.h" 42 #include "net/cookies/canonical_cookie.h"
43 #include "net/url_request/url_request.h" 43 #include "net/url_request/url_request.h"
44 44
45 class ResourceHandler; 45 class ResourceHandler;
46 struct ResourceHostMsg_Request; 46 struct ResourceHostMsg_Request;
47 47
48 namespace base {
49 class FilePath;
50 }
51
48 namespace net { 52 namespace net {
49 class URLRequestJobFactory; 53 class URLRequestJobFactory;
50 } 54 }
51 55
52 namespace storage { 56 namespace storage {
53 class ShareableFileReference; 57 class ShareableFileReference;
54 } 58 }
55 59
56 namespace content { 60 namespace content {
57 class AppCacheService; 61 class AppCacheService;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 uint32 id, 239 uint32 id,
236 scoped_ptr<DownloadSaveInfo> save_info, 240 scoped_ptr<DownloadSaveInfo> save_info,
237 const DownloadUrlParameters::OnStartedCallback& started_cb); 241 const DownloadUrlParameters::OnStartedCallback& started_cb);
238 242
239 // Must be called after the ResourceRequestInfo has been created 243 // Must be called after the ResourceRequestInfo has been created
240 // and associated with the request. If |payload| is set to a non-empty value, 244 // and associated with the request. If |payload| is set to a non-empty value,
241 // the value will be sent to the old resource handler instead of canceling 245 // the value will be sent to the old resource handler instead of canceling
242 // it, except on HTTP errors. This is marked virtual so it can be overriden in 246 // it, except on HTTP errors. This is marked virtual so it can be overriden in
243 // testing. 247 // testing.
244 virtual scoped_ptr<ResourceHandler> MaybeInterceptAsStream( 248 virtual scoped_ptr<ResourceHandler> MaybeInterceptAsStream(
249 const base::FilePath& plugin_path,
245 net::URLRequest* request, 250 net::URLRequest* request,
246 ResourceResponse* response, 251 ResourceResponse* response,
247 std::string* payload); 252 std::string* payload);
248 253
249 ResourceScheduler* scheduler() { return scheduler_.get(); } 254 ResourceScheduler* scheduler() { return scheduler_.get(); }
250 255
251 // Called by a ResourceHandler when it's ready to start reading data and 256 // Called by a ResourceHandler when it's ready to start reading data and
252 // sending it to the renderer. Returns true if there are enough file 257 // sending it to the renderer. Returns true if there are enough file
253 // descriptors available for the shared memory buffer. If false is returned, 258 // descriptors available for the shared memory buffer. If false is returned,
254 // the request should cancel. 259 // the request should cancel.
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 DelegateMap delegate_map_; 586 DelegateMap delegate_map_;
582 587
583 scoped_ptr<ResourceScheduler> scheduler_; 588 scoped_ptr<ResourceScheduler> scheduler_;
584 589
585 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 590 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
586 }; 591 };
587 592
588 } // namespace content 593 } // namespace content
589 594
590 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 595 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/buffered_resource_handler_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698