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

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host_impl.cc

Issue 10823406: Remove DownloadFileManager in favor of direct ownership of DownloadFiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments and merged to LKGR. Created 8 years, 3 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 (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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/debug/alias.h" 16 #include "base/debug/alias.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/message_loop.h" 19 #include "base/message_loop.h"
20 #include "base/metrics/histogram.h" 20 #include "base/metrics/histogram.h"
21 #include "base/shared_memory.h" 21 #include "base/shared_memory.h"
22 #include "base/stl_util.h" 22 #include "base/stl_util.h"
23 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 23 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
24 #include "base/threading/thread_restrictions.h" 24 #include "base/threading/thread_restrictions.h"
25 #include "content/browser/appcache/chrome_appcache_service.h" 25 #include "content/browser/appcache/chrome_appcache_service.h"
26 #include "content/browser/cert_store_impl.h" 26 #include "content/browser/cert_store_impl.h"
27 #include "content/browser/child_process_security_policy_impl.h" 27 #include "content/browser/child_process_security_policy_impl.h"
28 #include "content/browser/cross_site_request_manager.h" 28 #include "content/browser/cross_site_request_manager.h"
29 #include "content/browser/download/download_file_manager.h"
30 #include "content/browser/download/download_resource_handler.h" 29 #include "content/browser/download/download_resource_handler.h"
31 #include "content/browser/download/save_file_manager.h" 30 #include "content/browser/download/save_file_manager.h"
32 #include "content/browser/download/save_file_resource_handler.h" 31 #include "content/browser/download/save_file_resource_handler.h"
33 #include "content/browser/fileapi/chrome_blob_storage_context.h" 32 #include "content/browser/fileapi/chrome_blob_storage_context.h"
34 #include "content/browser/plugin_service_impl.h" 33 #include "content/browser/plugin_service_impl.h"
35 #include "content/browser/renderer_host/async_resource_handler.h" 34 #include "content/browser/renderer_host/async_resource_handler.h"
36 #include "content/browser/renderer_host/buffered_resource_handler.h" 35 #include "content/browser/renderer_host/buffered_resource_handler.h"
37 #include "content/browser/renderer_host/cross_site_resource_handler.h" 36 #include "content/browser/renderer_host/cross_site_resource_handler.h"
38 #include "content/browser/renderer_host/duplicate_content_resource_handler.h" 37 #include "content/browser/renderer_host/duplicate_content_resource_handler.h"
39 #include "content/browser/renderer_host/redirect_to_file_resource_handler.h" 38 #include "content/browser/renderer_host/redirect_to_file_resource_handler.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 344 }
346 345
347 } // namespace 346 } // namespace
348 347
349 // static 348 // static
350 ResourceDispatcherHost* ResourceDispatcherHost::Get() { 349 ResourceDispatcherHost* ResourceDispatcherHost::Get() {
351 return g_resource_dispatcher_host; 350 return g_resource_dispatcher_host;
352 } 351 }
353 352
354 ResourceDispatcherHostImpl::ResourceDispatcherHostImpl() 353 ResourceDispatcherHostImpl::ResourceDispatcherHostImpl()
355 : download_file_manager_(new DownloadFileManager(NULL)), 354 : save_file_manager_(new SaveFileManager()),
356 save_file_manager_(new SaveFileManager()),
357 request_id_(-1), 355 request_id_(-1),
358 is_shutdown_(false), 356 is_shutdown_(false),
359 max_outstanding_requests_cost_per_process_( 357 max_outstanding_requests_cost_per_process_(
360 kMaxOutstandingRequestsCostPerProcess), 358 kMaxOutstandingRequestsCostPerProcess),
361 filter_(NULL), 359 filter_(NULL),
362 delegate_(NULL), 360 delegate_(NULL),
363 allow_cross_origin_auth_prompt_(false) { 361 allow_cross_origin_auth_prompt_(false) {
364 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 362 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
365 DCHECK(!g_resource_dispatcher_host); 363 DCHECK(!g_resource_dispatcher_host);
366 g_resource_dispatcher_host = this; 364 g_resource_dispatcher_host = this;
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 1726
1729 return i->second.get(); 1727 return i->second.get();
1730 } 1728 }
1731 1729
1732 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, 1730 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id,
1733 int request_id) const { 1731 int request_id) const {
1734 return GetLoader(GlobalRequestID(child_id, request_id)); 1732 return GetLoader(GlobalRequestID(child_id, request_id));
1735 } 1733 }
1736 1734
1737 } // namespace content 1735 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698