| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/extension_garbage_collector_factory.h" | 5 #include "chrome/browser/extensions/extension_garbage_collector_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/extensions/extension_garbage_collector.h" | 10 #include "chrome/browser/extensions/extension_garbage_collector.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 DependsOn(InstallTrackerFactory::GetInstance()); | 41 DependsOn(InstallTrackerFactory::GetInstance()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 ExtensionGarbageCollectorFactory::~ExtensionGarbageCollectorFactory() {} | 44 ExtensionGarbageCollectorFactory::~ExtensionGarbageCollectorFactory() {} |
| 45 | 45 |
| 46 // static | 46 // static |
| 47 std::unique_ptr<KeyedService> | 47 std::unique_ptr<KeyedService> |
| 48 ExtensionGarbageCollectorFactory::BuildInstanceFor( | 48 ExtensionGarbageCollectorFactory::BuildInstanceFor( |
| 49 content::BrowserContext* context) { | 49 content::BrowserContext* context) { |
| 50 #if defined(OS_CHROMEOS) | 50 #if defined(OS_CHROMEOS) |
| 51 return base::WrapUnique(new ExtensionGarbageCollectorChromeOS(context)); | 51 return base::MakeUnique<ExtensionGarbageCollectorChromeOS>(context); |
| 52 #else | 52 #else |
| 53 return base::WrapUnique(new ExtensionGarbageCollector(context)); | 53 return base::MakeUnique<ExtensionGarbageCollector>(context); |
| 54 #endif | 54 #endif |
| 55 } | 55 } |
| 56 | 56 |
| 57 KeyedService* ExtensionGarbageCollectorFactory::BuildServiceInstanceFor( | 57 KeyedService* ExtensionGarbageCollectorFactory::BuildServiceInstanceFor( |
| 58 content::BrowserContext* context) const { | 58 content::BrowserContext* context) const { |
| 59 return BuildInstanceFor(context).release(); | 59 return BuildInstanceFor(context).release(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool ExtensionGarbageCollectorFactory::ServiceIsCreatedWithBrowserContext() | 62 bool ExtensionGarbageCollectorFactory::ServiceIsCreatedWithBrowserContext() |
| 63 const { | 63 const { |
| 64 return true; | 64 return true; |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool ExtensionGarbageCollectorFactory::ServiceIsNULLWhileTesting() const { | 67 bool ExtensionGarbageCollectorFactory::ServiceIsNULLWhileTesting() const { |
| 68 return true; | 68 return true; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace extensions | 71 } // namespace extensions |
| OLD | NEW |