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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressing comments from Andrew Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); 489 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
490 DCHECK(set_protocol); 490 DCHECK(set_protocol);
491 #if defined(OS_CHROMEOS) && !defined(GOOGLE_CHROME_BUILD) 491 #if defined(OS_CHROMEOS) && !defined(GOOGLE_CHROME_BUILD)
492 // Install the GView request interceptor that will redirect requests 492 // Install the GView request interceptor that will redirect requests
493 // of compatible documents (PDF, etc) to the GView document viewer. 493 // of compatible documents (PDF, etc) to the GView document viewer.
494 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 494 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
495 if (parsed_command_line.HasSwitch(switches::kEnableGView)) 495 if (parsed_command_line.HasSwitch(switches::kEnableGView))
496 job_factory_->AddInterceptor(new chromeos::GViewRequestInterceptor); 496 job_factory_->AddInterceptor(new chromeos::GViewRequestInterceptor);
497 #endif // defined(OS_CHROMEOS) && !defined(GOOGLE_CHROME_BUILD) 497 #endif // defined(OS_CHROMEOS) && !defined(GOOGLE_CHROME_BUILD)
498 498
499 media_stream_manager_.reset(new media_stream::MediaStreamManager); 499 media_stream_manager_.reset(
500 new media_stream::MediaStreamManager(g_browser_process->audio_manager()));
willchan no longer on Chromium 2011/12/10 00:27:33 Can you make audio_manager get passed in on the UI
tommi (sloooow) - chröme 2011/12/10 09:59:57 Just so that I understand - do you mean that g_bro
willchan no longer on Chromium 2011/12/12 16:44:05 Sounds great and your change looks great to me.
500 501
501 // Take ownership over these parameters. 502 // Take ownership over these parameters.
502 database_tracker_ = profile_params_->database_tracker; 503 database_tracker_ = profile_params_->database_tracker;
503 appcache_service_ = profile_params_->appcache_service; 504 appcache_service_ = profile_params_->appcache_service;
504 blob_storage_context_ = profile_params_->blob_storage_context; 505 blob_storage_context_ = profile_params_->blob_storage_context;
505 file_system_context_ = profile_params_->file_system_context; 506 file_system_context_ = profile_params_->file_system_context;
506 quota_manager_ = profile_params_->quota_manager; 507 quota_manager_ = profile_params_->quota_manager;
507 host_zoom_map_ = profile_params_->host_zoom_map; 508 host_zoom_map_ = profile_params_->host_zoom_map;
508 host_content_settings_map_ = profile_params_->host_content_settings_map; 509 host_content_settings_map_ = profile_params_->host_content_settings_map;
509 cookie_settings_ = profile_params_->cookie_settings; 510 cookie_settings_ = profile_params_->cookie_settings;
510 notification_service_ = profile_params_->notification_service; 511 notification_service_ = profile_params_->notification_service;
511 extension_info_map_ = profile_params_->extension_info_map; 512 extension_info_map_ = profile_params_->extension_info_map;
512 513
513 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get()); 514 resource_context_.set_host_resolver(io_thread_globals->host_resolver.get());
514 resource_context_.set_request_context(main_request_context_); 515 resource_context_.set_request_context(main_request_context_);
515 resource_context_.set_database_tracker(database_tracker_); 516 resource_context_.set_database_tracker(database_tracker_);
516 resource_context_.set_appcache_service(appcache_service_); 517 resource_context_.set_appcache_service(appcache_service_);
517 resource_context_.set_blob_storage_context(blob_storage_context_); 518 resource_context_.set_blob_storage_context(blob_storage_context_);
518 resource_context_.set_file_system_context(file_system_context_); 519 resource_context_.set_file_system_context(file_system_context_);
519 resource_context_.set_quota_manager(quota_manager_); 520 resource_context_.set_quota_manager(quota_manager_);
520 resource_context_.set_host_zoom_map(host_zoom_map_); 521 resource_context_.set_host_zoom_map(host_zoom_map_);
521 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this)); 522 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this));
522 resource_context_.set_media_observer( 523 resource_context_.set_media_observer(
523 io_thread_globals->media.media_internals.get()); 524 io_thread_globals->media.media_internals.get());
524 resource_context_.set_download_id_factory(download_id_factory_); 525 resource_context_.set_download_id_factory(download_id_factory_);
525 resource_context_.set_media_stream_manager(media_stream_manager_.get()); 526 resource_context_.set_media_stream_manager(media_stream_manager_.get());
527 resource_context_.set_audio_manager(g_browser_process->audio_manager());
526 528
527 LazyInitializeInternal(profile_params_.get()); 529 LazyInitializeInternal(profile_params_.get());
528 530
529 profile_params_.reset(); 531 profile_params_.reset();
530 initialized_ = true; 532 initialized_ = true;
531 } 533 }
532 534
533 void ProfileIOData::ApplyProfileParamsToContext( 535 void ProfileIOData::ApplyProfileParamsToContext(
534 ChromeURLRequestContext* context) const { 536 ChromeURLRequestContext* context) const {
535 context->set_is_incognito(profile_params_->is_incognito); 537 context->set_is_incognito(profile_params_->is_incognito);
(...skipping 21 matching lines...) Expand all
557 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 559 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
558 new DeleteTask<ProfileIOData>(this)); 560 new DeleteTask<ProfileIOData>(this));
559 if (!posted) 561 if (!posted)
560 delete this; 562 delete this;
561 } 563 }
562 564
563 void ProfileIOData::set_origin_bound_cert_service( 565 void ProfileIOData::set_origin_bound_cert_service(
564 net::OriginBoundCertService* origin_bound_cert_service) const { 566 net::OriginBoundCertService* origin_bound_cert_service) const {
565 origin_bound_cert_service_.reset(origin_bound_cert_service); 567 origin_bound_cert_service_.reset(origin_bound_cert_service);
566 } 568 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698