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

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: Fix browser test redness by ensuring that the ResourceDispatcherHostDelegate is notified in CreateR… Created 4 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
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_manager_impl.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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 UMA_HISTOGRAM_BOOLEAN("Windows.Win32kRendererLockdown", 1282 UMA_HISTOGRAM_BOOLEAN("Windows.Win32kRendererLockdown",
1282 IsWin32kRendererLockdownEnabled()); 1283 IsWin32kRendererLockdownEnabled());
1283 #endif 1284 #endif
1284 1285
1285 // RDH needs the IO thread to be created 1286 // RDH needs the IO thread to be created
1286 { 1287 {
1287 TRACE_EVENT0("startup", 1288 TRACE_EVENT0("startup",
1288 "BrowserMainLoop::BrowserThreadsStarted:InitResourceDispatcherHost"); 1289 "BrowserMainLoop::BrowserThreadsStarted:InitResourceDispatcherHost");
1289 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); 1290 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl());
1290 GetContentClient()->browser()->ResourceDispatcherHostCreated(); 1291 GetContentClient()->browser()->ResourceDispatcherHostCreated();
1292 // TODO(ananta)
1293 // We register an interceptor on the ResourceDispatcherHostImpl instance to
1294 // intercept requests to create handlers for download requests. We need to
1295 // find a better way to achieve this. Ideally we don't want knowledge of
1296 // downloads in ResourceDispatcherHostImpl.
1297 DownloadManagerImpl::ResourceDispatcherHostCreated();
svaldez 2016/08/19 17:05:14 Consider migrating or copying this comment to the
ananta 2016/08/19 19:02:14 Done.
1291 1298
1292 loader_delegate_.reset(new LoaderDelegateImpl()); 1299 loader_delegate_.reset(new LoaderDelegateImpl());
1293 resource_dispatcher_host_->SetLoaderDelegate(loader_delegate_.get()); 1300 resource_dispatcher_host_->SetLoaderDelegate(loader_delegate_.get());
1294 } 1301 }
1295 1302
1296 // MediaStreamManager needs the IO thread to be created. 1303 // MediaStreamManager needs the IO thread to be created.
1297 { 1304 {
1298 TRACE_EVENT0("startup", 1305 TRACE_EVENT0("startup",
1299 "BrowserMainLoop::BrowserThreadsStarted:InitMediaStreamManager"); 1306 "BrowserMainLoop::BrowserThreadsStarted:InitMediaStreamManager");
1300 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); 1307 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1546 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1540 audio_thread_->task_runner(); 1547 audio_thread_->task_runner();
1541 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1548 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1542 std::move(worker_task_runner), 1549 std::move(worker_task_runner),
1543 MediaInternals::GetInstance()); 1550 MediaInternals::GetInstance());
1544 } 1551 }
1545 CHECK(audio_manager_); 1552 CHECK(audio_manager_);
1546 } 1553 }
1547 1554
1548 } // namespace content 1555 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_manager_impl.h » ('j') | content/browser/download/download_resource_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698