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

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

Issue 9375024: Get IPC working for Indexed DB in shared workers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove param_traits Created 8 years, 10 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 #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 24 matching lines...) Expand all
35 #include "chrome/browser/profiles/profile.h" 35 #include "chrome/browser/profiles/profile.h"
36 #include "chrome/browser/profiles/profile_manager.h" 36 #include "chrome/browser/profiles/profile_manager.h"
37 #include "chrome/browser/transport_security_persister.h" 37 #include "chrome/browser/transport_security_persister.h"
38 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" 38 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h"
39 #include "chrome/common/chrome_notification_types.h" 39 #include "chrome/common/chrome_notification_types.h"
40 #include "chrome/common/chrome_switches.h" 40 #include "chrome/common/chrome_switches.h"
41 #include "chrome/common/pref_names.h" 41 #include "chrome/common/pref_names.h"
42 #include "chrome/common/url_constants.h" 42 #include "chrome/common/url_constants.h"
43 #include "content/browser/appcache/chrome_appcache_service.h" 43 #include "content/browser/appcache/chrome_appcache_service.h"
44 #include "content/browser/chrome_blob_storage_context.h" 44 #include "content/browser/chrome_blob_storage_context.h"
45 #include "content/browser/in_process_webkit/webkit_context.h"
45 #include "content/browser/renderer_host/media/media_stream_manager.h" 46 #include "content/browser/renderer_host/media/media_stream_manager.h"
46 #include "content/browser/renderer_host/resource_dispatcher_host.h" 47 #include "content/browser/renderer_host/resource_dispatcher_host.h"
47 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" 48 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
48 #include "content/public/browser/browser_thread.h" 49 #include "content/public/browser/browser_thread.h"
49 #include "content/public/browser/host_zoom_map.h" 50 #include "content/public/browser/host_zoom_map.h"
50 #include "content/public/browser/notification_service.h" 51 #include "content/public/browser/notification_service.h"
51 #include "content/public/browser/resource_context.h" 52 #include "content/public/browser/resource_context.h"
52 #include "media/audio/audio_manager.h" 53 #include "media/audio/audio_manager.h"
53 #include "net/base/origin_bound_cert_service.h" 54 #include "net/base/origin_bound_cert_service.h"
54 #include "net/http/http_transaction_factory.h" 55 #include "net/http/http_transaction_factory.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 params->ssl_config_service = profile->GetSSLConfigService(); 228 params->ssl_config_service = profile->GetSSLConfigService();
228 base::Callback<Profile*(void)> profile_getter = 229 base::Callback<Profile*(void)> profile_getter =
229 base::Bind(&GetProfileOnUI, g_browser_process->profile_manager(), 230 base::Bind(&GetProfileOnUI, g_browser_process->profile_manager(),
230 profile); 231 profile);
231 params->cookie_monster_delegate = 232 params->cookie_monster_delegate =
232 new ChromeCookieMonsterDelegate(profile_getter); 233 new ChromeCookieMonsterDelegate(profile_getter);
233 params->database_tracker = profile->GetDatabaseTracker(); 234 params->database_tracker = profile->GetDatabaseTracker();
234 params->appcache_service = profile->GetAppCacheService(); 235 params->appcache_service = profile->GetAppCacheService();
235 params->blob_storage_context = profile->GetBlobStorageContext(); 236 params->blob_storage_context = profile->GetBlobStorageContext();
236 params->file_system_context = profile->GetFileSystemContext(); 237 params->file_system_context = profile->GetFileSystemContext();
238 params->webkit_context = profile->GetWebKitContext();
237 params->quota_manager = profile->GetQuotaManager(); 239 params->quota_manager = profile->GetQuotaManager();
238 params->extension_info_map = profile->GetExtensionInfoMap(); 240 params->extension_info_map = profile->GetExtensionInfoMap();
239 params->notification_service = 241 params->notification_service =
240 DesktopNotificationServiceFactory::GetForProfile(profile); 242 DesktopNotificationServiceFactory::GetForProfile(profile);
241 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); 243 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry();
242 244
243 ChromeProxyConfigService* proxy_config_service = 245 ChromeProxyConfigService* proxy_config_service =
244 ProxyServiceFactory::CreateProxyConfigService(true); 246 ProxyServiceFactory::CreateProxyConfigService(true);
245 params->proxy_config_service.reset(proxy_config_service); 247 params->proxy_config_service.reset(proxy_config_service);
246 profile->GetProxyConfigTracker()->SetChromeProxyConfigService( 248 profile->GetProxyConfigTracker()->SetChromeProxyConfigService(
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 EnsureInitialized(); 468 EnsureInitialized();
467 return media_stream_manager_; 469 return media_stream_manager_;
468 } 470 }
469 471
470 AudioManager* ProfileIOData::ResourceContext::GetAudioManager() { 472 AudioManager* ProfileIOData::ResourceContext::GetAudioManager() {
471 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 473 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
472 EnsureInitialized(); 474 EnsureInitialized();
473 return audio_manager_; 475 return audio_manager_;
474 } 476 }
475 477
478 WebKitContext* ProfileIOData::ResourceContext::GetWebKitContext() {
michaeln 2012/02/15 03:45:03 probably want the same DCHECK here as the other ac
dgrogan 2012/02/15 08:34:59 Done.
479 EnsureInitialized();
480 return webkit_context_;
481 }
482
476 void ProfileIOData::LazyInitialize() const { 483 void ProfileIOData::LazyInitialize() const {
477 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 484 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
478 if (initialized_) 485 if (initialized_)
479 return; 486 return;
480 487
481 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 488 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
482 CHECK(initialized_on_UI_thread_); 489 CHECK(initialized_on_UI_thread_);
483 490
484 // TODO(jhawkins): Return to DCHECK once crbug.com/102004 is fixed. 491 // TODO(jhawkins): Return to DCHECK once crbug.com/102004 is fixed.
485 CHECK(profile_params_.get()); 492 CHECK(profile_params_.get());
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 #endif // defined(OS_CHROMEOS) && !defined(GOOGLE_CHROME_BUILD) 573 #endif // defined(OS_CHROMEOS) && !defined(GOOGLE_CHROME_BUILD)
567 574
568 media_stream_manager_.reset( 575 media_stream_manager_.reset(
569 new media_stream::MediaStreamManager(profile_params_->audio_manager)); 576 new media_stream::MediaStreamManager(profile_params_->audio_manager));
570 577
571 // Take ownership over these parameters. 578 // Take ownership over these parameters.
572 database_tracker_ = profile_params_->database_tracker; 579 database_tracker_ = profile_params_->database_tracker;
573 appcache_service_ = profile_params_->appcache_service; 580 appcache_service_ = profile_params_->appcache_service;
574 blob_storage_context_ = profile_params_->blob_storage_context; 581 blob_storage_context_ = profile_params_->blob_storage_context;
575 file_system_context_ = profile_params_->file_system_context; 582 file_system_context_ = profile_params_->file_system_context;
583 webkit_context_ = profile_params_->webkit_context;
576 quota_manager_ = profile_params_->quota_manager; 584 quota_manager_ = profile_params_->quota_manager;
577 host_zoom_map_ = profile_params_->host_zoom_map; 585 host_zoom_map_ = profile_params_->host_zoom_map;
578 host_content_settings_map_ = profile_params_->host_content_settings_map; 586 host_content_settings_map_ = profile_params_->host_content_settings_map;
579 cookie_settings_ = profile_params_->cookie_settings; 587 cookie_settings_ = profile_params_->cookie_settings;
580 notification_service_ = profile_params_->notification_service; 588 notification_service_ = profile_params_->notification_service;
581 extension_info_map_ = profile_params_->extension_info_map; 589 extension_info_map_ = profile_params_->extension_info_map;
582 590
583 resource_context_.host_resolver_ = io_thread_globals->host_resolver.get(); 591 resource_context_.host_resolver_ = io_thread_globals->host_resolver.get();
584 resource_context_.request_context_ = main_request_context_; 592 resource_context_.request_context_ = main_request_context_;
585 resource_context_.database_tracker_ = database_tracker_; 593 resource_context_.database_tracker_ = database_tracker_;
586 resource_context_.appcache_service_ = appcache_service_; 594 resource_context_.appcache_service_ = appcache_service_;
587 resource_context_.blob_storage_context_ = blob_storage_context_; 595 resource_context_.blob_storage_context_ = blob_storage_context_;
588 resource_context_.file_system_context_ = file_system_context_; 596 resource_context_.file_system_context_ = file_system_context_;
597 resource_context_.webkit_context_ = webkit_context_;
589 resource_context_.quota_manager_ = quota_manager_; 598 resource_context_.quota_manager_ = quota_manager_;
590 resource_context_.host_zoom_map_ = host_zoom_map_; 599 resource_context_.host_zoom_map_ = host_zoom_map_;
591 resource_context_.media_observer_ = 600 resource_context_.media_observer_ =
592 io_thread_globals->media.media_internals.get(); 601 io_thread_globals->media.media_internals.get();
593 resource_context_.media_stream_manager_ = media_stream_manager_.get(); 602 resource_context_.media_stream_manager_ = media_stream_manager_.get();
594 resource_context_.audio_manager_ = profile_params_->audio_manager; 603 resource_context_.audio_manager_ = profile_params_->audio_manager;
595 604
596 LazyInitializeInternal(profile_params_.get()); 605 LazyInitializeInternal(profile_params_.get());
597 606
598 profile_params_.reset(); 607 profile_params_.reset();
(...skipping 26 matching lines...) Expand all
625 &resource_context_)); 634 &resource_context_));
626 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); 635 bool posted = BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this);
627 if (!posted) 636 if (!posted)
628 delete this; 637 delete this;
629 } 638 }
630 639
631 void ProfileIOData::set_origin_bound_cert_service( 640 void ProfileIOData::set_origin_bound_cert_service(
632 net::OriginBoundCertService* origin_bound_cert_service) const { 641 net::OriginBoundCertService* origin_bound_cert_service) const {
633 origin_bound_cert_service_.reset(origin_bound_cert_service); 642 origin_bound_cert_service_.reset(origin_bound_cert_service);
634 } 643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698