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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2251643003: Remove the BeginSaveFile and BeginDownload methods from ResourceDispatcherHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address next round of review comments and keep the download test in resource_dispatcher_host_unitteā€¦ Created 4 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
« no previous file with comments | « no previous file | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 27 matching lines...) Expand all
38 #include "build/build_config.h" 38 #include "build/build_config.h"
39 #include "components/memory_coordinator/browser/memory_coordinator.h" 39 #include "components/memory_coordinator/browser/memory_coordinator.h"
40 #include "components/memory_coordinator/common/memory_coordinator_features.h" 40 #include "components/memory_coordinator/common/memory_coordinator_features.h"
41 #include "components/tracing/browser/trace_config_file.h" 41 #include "components/tracing/browser/trace_config_file.h"
42 #include "components/tracing/common/process_metrics_memory_dump_provider.h" 42 #include "components/tracing/common/process_metrics_memory_dump_provider.h"
43 #include "components/tracing/common/trace_to_console.h" 43 #include "components/tracing/common/trace_to_console.h"
44 #include "components/tracing/common/tracing_switches.h" 44 #include "components/tracing/common/tracing_switches.h"
45 #include "content/browser/browser_thread_impl.h" 45 #include "content/browser/browser_thread_impl.h"
46 #include "content/browser/device_sensors/device_sensor_service.h" 46 #include "content/browser/device_sensors/device_sensor_service.h"
47 #include "content/browser/dom_storage/dom_storage_area.h" 47 #include "content/browser/dom_storage/dom_storage_area.h"
48 #include "content/browser/download/download_resource_handler.h"
48 #include "content/browser/download/save_file_manager.h" 49 #include "content/browser/download/save_file_manager.h"
49 #include "content/browser/gamepad/gamepad_service.h" 50 #include "content/browser/gamepad/gamepad_service.h"
50 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 51 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
51 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 52 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
52 #include "content/browser/gpu/compositor_util.h" 53 #include "content/browser/gpu/compositor_util.h"
53 #include "content/browser/gpu/gpu_data_manager_impl.h" 54 #include "content/browser/gpu/gpu_data_manager_impl.h"
54 #include "content/browser/gpu/gpu_process_host.h" 55 #include "content/browser/gpu/gpu_process_host.h"
55 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 56 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
56 #include "content/browser/histogram_synchronizer.h" 57 #include "content/browser/histogram_synchronizer.h"
57 #include "content/browser/loader/resource_dispatcher_host_impl.h" 58 #include "content/browser/loader/resource_dispatcher_host_impl.h"
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 1274
1274 #if defined(OS_WIN) 1275 #if defined(OS_WIN)
1275 UMA_HISTOGRAM_BOOLEAN("Windows.Win32kRendererLockdown", 1276 UMA_HISTOGRAM_BOOLEAN("Windows.Win32kRendererLockdown",
1276 IsWin32kRendererLockdownEnabled()); 1277 IsWin32kRendererLockdownEnabled());
1277 #endif 1278 #endif
1278 1279
1279 // RDH needs the IO thread to be created 1280 // RDH needs the IO thread to be created
1280 { 1281 {
1281 TRACE_EVENT0("startup", 1282 TRACE_EVENT0("startup",
1282 "BrowserMainLoop::BrowserThreadsStarted:InitResourceDispatcherHost"); 1283 "BrowserMainLoop::BrowserThreadsStarted:InitResourceDispatcherHost");
1283 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); 1284 // TODO(ananta)
1285 // We register an interceptor on the ResourceDispatcherHostImpl instance to
1286 // intercept requests to create handlers for download requests. We need to
1287 // find a better way to achieve this. Ideally we don't want knowledge of
1288 // downloads in ResourceDispatcherHostImpl.
1289 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl(
1290 base::Bind(&DownloadResourceHandler::Create)));
1284 GetContentClient()->browser()->ResourceDispatcherHostCreated(); 1291 GetContentClient()->browser()->ResourceDispatcherHostCreated();
1285 1292
1286 loader_delegate_.reset(new LoaderDelegateImpl()); 1293 loader_delegate_.reset(new LoaderDelegateImpl());
1287 resource_dispatcher_host_->SetLoaderDelegate(loader_delegate_.get()); 1294 resource_dispatcher_host_->SetLoaderDelegate(loader_delegate_.get());
1288 } 1295 }
1289 1296
1290 // MediaStreamManager needs the IO thread to be created. 1297 // MediaStreamManager needs the IO thread to be created.
1291 { 1298 {
1292 TRACE_EVENT0("startup", 1299 TRACE_EVENT0("startup",
1293 "BrowserMainLoop::BrowserThreadsStarted:InitMediaStreamManager"); 1300 "BrowserMainLoop::BrowserThreadsStarted:InitMediaStreamManager");
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1540 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1534 audio_thread_->task_runner(); 1541 audio_thread_->task_runner();
1535 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1542 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1536 std::move(worker_task_runner), 1543 std::move(worker_task_runner),
1537 MediaInternals::GetInstance()); 1544 MediaInternals::GetInstance());
1538 } 1545 }
1539 CHECK(audio_manager_); 1546 CHECK(audio_manager_);
1540 } 1547 }
1541 1548
1542 } // namespace content 1549 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698