summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/profiles')
-rw-r--r--chrome/browser/profiles/profile_io_data.cc9
-rw-r--r--chrome/browser/profiles/profile_io_data.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index a029925..1556ad8 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/extensions/extension_info_map.h"
#include "chrome/browser/extensions/extension_protocols.h"
#include "chrome/browser/io_thread.h"
+#include "chrome/browser/media/media_internals.h"
#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h"
#include "chrome/browser/net/chrome_net_log.h"
@@ -390,6 +391,12 @@ net::URLRequestContext* ProfileIOData::ResourceContext::GetRequestContext() {
return request_context_;
}
+content::MediaObserver* ProfileIOData::ResourceContext::GetMediaObserver() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ EnsureInitialized();
+ return media_observer_;
+}
+
// static
std::string ProfileIOData::GetSSLSessionCacheShard() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -488,6 +495,8 @@ void ProfileIOData::LazyInitialize() const {
resource_context_.host_resolver_ = io_thread_globals->host_resolver.get();
resource_context_.request_context_ = main_request_context_;
+ resource_context_.media_observer_ =
+ io_thread_globals->media.media_internals.get();
LazyInitializeInternal(profile_params_.get());
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
index 4cafe09..b6ff4c8 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -219,12 +219,15 @@ class ProfileIOData {
// ResourceContext implementation:
virtual net::HostResolver* GetHostResolver() OVERRIDE;
virtual net::URLRequestContext* GetRequestContext() OVERRIDE;
+ virtual content::MediaObserver* GetMediaObserver() OVERRIDE;
+
void EnsureInitialized();
ProfileIOData* const io_data_;
net::HostResolver* host_resolver_;
net::URLRequestContext* request_context_;
+ content::MediaObserver* media_observer_;
};
typedef base::hash_map<std::string, scoped_refptr<ChromeURLRequestContext> >