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

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

Issue 10799005: Replace the DownloadFileManager with direct ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR. Created 8 years, 4 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 342 }
344 343
345 } // namespace 344 } // namespace
346 345
347 // static 346 // static
348 ResourceDispatcherHost* ResourceDispatcherHost::Get() { 347 ResourceDispatcherHost* ResourceDispatcherHost::Get() {
349 return g_resource_dispatcher_host; 348 return g_resource_dispatcher_host;
350 } 349 }
351 350
352 ResourceDispatcherHostImpl::ResourceDispatcherHostImpl() 351 ResourceDispatcherHostImpl::ResourceDispatcherHostImpl()
353 : download_file_manager_(new DownloadFileManager(NULL)), 352 : save_file_manager_(new SaveFileManager()),
354 save_file_manager_(new SaveFileManager()),
355 request_id_(-1), 353 request_id_(-1),
356 is_shutdown_(false), 354 is_shutdown_(false),
357 max_outstanding_requests_cost_per_process_( 355 max_outstanding_requests_cost_per_process_(
358 kMaxOutstandingRequestsCostPerProcess), 356 kMaxOutstandingRequestsCostPerProcess),
359 filter_(NULL), 357 filter_(NULL),
360 delegate_(NULL), 358 delegate_(NULL),
361 allow_cross_origin_auth_prompt_(false) { 359 allow_cross_origin_auth_prompt_(false) {
362 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 360 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
363 DCHECK(!g_resource_dispatcher_host); 361 DCHECK(!g_resource_dispatcher_host);
364 g_resource_dispatcher_host = this; 362 g_resource_dispatcher_host = this;
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 1728
1731 return i->second.get(); 1729 return i->second.get();
1732 } 1730 }
1733 1731
1734 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, 1732 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id,
1735 int request_id) const { 1733 int request_id) const {
1736 return GetLoader(GlobalRequestID(child_id, request_id)); 1734 return GetLoader(GlobalRequestID(child_id, request_id));
1737 } 1735 }
1738 1736
1739 } // namespace content 1737 } // 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