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

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: Fixed try job problems. Created 8 years, 5 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/redirect_to_file_resource_handler.h" 37 #include "content/browser/renderer_host/redirect_to_file_resource_handler.h"
39 #include "content/browser/renderer_host/render_view_host_delegate.h" 38 #include "content/browser/renderer_host/render_view_host_delegate.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 341 }
343 342
344 } // namespace 343 } // namespace
345 344
346 // static 345 // static
347 ResourceDispatcherHost* ResourceDispatcherHost::Get() { 346 ResourceDispatcherHost* ResourceDispatcherHost::Get() {
348 return g_resource_dispatcher_host; 347 return g_resource_dispatcher_host;
349 } 348 }
350 349
351 ResourceDispatcherHostImpl::ResourceDispatcherHostImpl() 350 ResourceDispatcherHostImpl::ResourceDispatcherHostImpl()
352 : download_file_manager_(new DownloadFileManager(NULL)), 351 : save_file_manager_(new SaveFileManager()),
353 save_file_manager_(new SaveFileManager()),
354 request_id_(-1), 352 request_id_(-1),
355 is_shutdown_(false), 353 is_shutdown_(false),
356 max_outstanding_requests_cost_per_process_( 354 max_outstanding_requests_cost_per_process_(
357 kMaxOutstandingRequestsCostPerProcess), 355 kMaxOutstandingRequestsCostPerProcess),
358 filter_(NULL), 356 filter_(NULL),
359 delegate_(NULL), 357 delegate_(NULL),
360 allow_cross_origin_auth_prompt_(false) { 358 allow_cross_origin_auth_prompt_(false) {
361 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 359 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
362 DCHECK(!g_resource_dispatcher_host); 360 DCHECK(!g_resource_dispatcher_host);
363 g_resource_dispatcher_host = this; 361 g_resource_dispatcher_host = this;
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 1717
1720 return i->second.get(); 1718 return i->second.get();
1721 } 1719 }
1722 1720
1723 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, 1721 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id,
1724 int request_id) const { 1722 int request_id) const {
1725 return GetLoader(GlobalRequestID(child_id, request_id)); 1723 return GetLoader(GlobalRequestID(child_id, request_id));
1726 } 1724 }
1727 1725
1728 } // namespace content 1726 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698