Index: chrome/browser/media/protected_media_identifier_permission_context_factory.cc |
diff --git a/chrome/browser/media/protected_media_identifier_permission_context_factory.cc b/chrome/browser/media/protected_media_identifier_permission_context_factory.cc |
index a87baa8250e74ed59e0633c3743918acd77c9523..73e721e854fea57273a13d11dc933e573d260498 100644 |
--- a/chrome/browser/media/protected_media_identifier_permission_context_factory.cc |
+++ b/chrome/browser/media/protected_media_identifier_permission_context_factory.cc |
@@ -9,39 +9,14 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/pref_names.h" |
#include "components/keyed_service/content/browser_context_dependency_manager.h" |
-#include "components/keyed_service/core/keyed_service.h" |
#include "components/pref_registry/pref_registry_syncable.h" |
-namespace { |
- |
-class Service : public KeyedService { |
- public: |
- explicit Service(Profile* profile) { |
- context_ = new ProtectedMediaIdentifierPermissionContext(profile); |
- } |
- |
- ProtectedMediaIdentifierPermissionContext* context() { |
- return context_.get(); |
- } |
- |
- virtual void Shutdown() override { |
- context()->ShutdownOnUIThread(); |
- } |
- |
- private: |
- scoped_refptr<ProtectedMediaIdentifierPermissionContext> context_; |
- |
- DISALLOW_COPY_AND_ASSIGN(Service); |
-}; |
- |
-} // namespace |
- |
// static |
ProtectedMediaIdentifierPermissionContext* |
ProtectedMediaIdentifierPermissionContextFactory::GetForProfile( |
Profile* profile) { |
- return static_cast<Service*>( |
- GetInstance()->GetServiceForBrowserContext(profile, true))->context(); |
+ return static_cast<ProtectedMediaIdentifierPermissionContext*>( |
+ GetInstance()->GetServiceForBrowserContext(profile, true)); |
} |
// static |
@@ -65,7 +40,8 @@ ProtectedMediaIdentifierPermissionContextFactory:: |
KeyedService* |
ProtectedMediaIdentifierPermissionContextFactory::BuildServiceInstanceFor( |
content::BrowserContext* profile) const { |
- return new Service(static_cast<Profile*>(profile)); |
+ return new ProtectedMediaIdentifierPermissionContext( |
+ static_cast<Profile*>(profile)); |
} |
void |