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

Side by Side Diff: chrome/browser/renderer_host/resource_dispatcher_host.h

Issue 501082: Implement delaying resource requests until privacy blacklists are ready. (Closed)
Patch Set: don't get stuck on errors Created 10 years, 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 fowards the messages from the 7 // dispatches them to URLRequests. It then fowards 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
11 11
12 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 12 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
13 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 13 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
14 14
15 #include <map> 15 #include <map>
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "base/basictypes.h" 19 #include "base/basictypes.h"
20 #include "base/logging.h" 20 #include "base/logging.h"
21 #include "base/observer_list.h" 21 #include "base/observer_list.h"
22 #include "base/process.h" 22 #include "base/process.h"
23 #include "base/timer.h" 23 #include "base/timer.h"
24 #include "chrome/common/child_process_info.h" 24 #include "chrome/common/child_process_info.h"
25 #include "chrome/browser/privacy_blacklist/blocked_response.h" 25 #include "chrome/browser/privacy_blacklist/blacklist_interceptor.h"
26 #include "chrome/browser/renderer_host/resource_queue.h" 26 #include "chrome/browser/renderer_host/resource_queue.h"
27 #include "ipc/ipc_message.h" 27 #include "ipc/ipc_message.h"
28 #include "net/url_request/url_request.h" 28 #include "net/url_request/url_request.h"
29 #include "webkit/glue/resource_type.h" 29 #include "webkit/glue/resource_type.h"
30 30
31 class BlacklistListener;
31 class CrossSiteResourceHandler; 32 class CrossSiteResourceHandler;
32 class DownloadFileManager; 33 class DownloadFileManager;
33 class DownloadRequestManager; 34 class DownloadRequestManager;
34 class LoginHandler; 35 class LoginHandler;
35 class PluginService; 36 class PluginService;
36 class ResourceDispatcherHostRequestInfo; 37 class ResourceDispatcherHostRequestInfo;
37 class ResourceHandler; 38 class ResourceHandler;
38 class SafeBrowsingService; 39 class SafeBrowsingService;
39 class SaveFileManager; 40 class SaveFileManager;
40 class SocketStreamDispatcherHost; 41 class SocketStreamDispatcherHost;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 403
403 // We own the download file writing thread and manager 404 // We own the download file writing thread and manager
404 scoped_refptr<DownloadFileManager> download_file_manager_; 405 scoped_refptr<DownloadFileManager> download_file_manager_;
405 406
406 // Determines whether a download is allowed. 407 // Determines whether a download is allowed.
407 scoped_refptr<DownloadRequestManager> download_request_manager_; 408 scoped_refptr<DownloadRequestManager> download_request_manager_;
408 409
409 // We own the save file manager. 410 // We own the save file manager.
410 scoped_refptr<SaveFileManager> save_file_manager_; 411 scoped_refptr<SaveFileManager> save_file_manager_;
411 412
413 // Handles requests blocked by privacy blacklists.
414 BlacklistInterceptor blacklist_interceptor_;
415
416 // Makes sure that each request is reliably checked against the privacy
417 // blacklist.
418 scoped_refptr<BlacklistListener> blacklist_listener_;
419
412 scoped_refptr<UserScriptListener> user_script_listener_; 420 scoped_refptr<UserScriptListener> user_script_listener_;
413 421
414 scoped_refptr<SafeBrowsingService> safe_browsing_; 422 scoped_refptr<SafeBrowsingService> safe_browsing_;
415 423
416 scoped_ptr<SocketStreamDispatcherHost> socket_stream_dispatcher_host_; 424 scoped_ptr<SocketStreamDispatcherHost> socket_stream_dispatcher_host_;
417 425
418 // We own the WebKit thread and see to its destruction. 426 // We own the WebKit thread and see to its destruction.
419 scoped_ptr<WebKitThread> webkit_thread_; 427 scoped_ptr<WebKitThread> webkit_thread_;
420 428
421 // Request ID for browser initiated requests. request_ids generated by 429 // Request ID for browser initiated requests. request_ids generated by
(...skipping 30 matching lines...) Expand all
452 // individual requests is given by CalculateApproximateMemoryCost). 460 // individual requests is given by CalculateApproximateMemoryCost).
453 // The total number of outstanding requests is roughly: 461 // The total number of outstanding requests is roughly:
454 // (max_outstanding_requests_cost_per_process_ / 462 // (max_outstanding_requests_cost_per_process_ /
455 // kAvgBytesPerOutstandingRequest) 463 // kAvgBytesPerOutstandingRequest)
456 int max_outstanding_requests_cost_per_process_; 464 int max_outstanding_requests_cost_per_process_;
457 465
458 // Used during IPC message dispatching so that the handlers can get a pointer 466 // Used during IPC message dispatching so that the handlers can get a pointer
459 // to the source of the message. 467 // to the source of the message.
460 Receiver* receiver_; 468 Receiver* receiver_;
461 469
462 // Keeps track of elements blocked by the Privacy Blacklist.
463 chrome::BlockedResponse blocked_;
464
465 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); 470 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost);
466 }; 471 };
467 472
468 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 473 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/privacy_blacklist/blocked_response.cc ('k') | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698