| OLD | NEW | 
| (Empty) |  | 
 |   1 // Copyright 2013 The Chromium Authors. All rights reserved. | 
 |   2 // Use of this source code is governed by a BSD-style license that can be | 
 |   3 // found in the LICENSE file. | 
 |   4  | 
 |   5 #include "components/precache/content/precache_manager_factory.h" | 
 |   6  | 
 |   7 #include "components/browser_context_keyed_service/browser_context_dependency_ma
    nager.h" | 
 |   8 #include "components/precache/content/precache_manager.h" | 
 |   9 #include "content/public/browser/browser_context.h" | 
 |  10  | 
 |  11 namespace precache { | 
 |  12  | 
 |  13 // static | 
 |  14 PrecacheManager* PrecacheManagerFactory::GetForBrowserContext( | 
 |  15     content::BrowserContext* browser_context) { | 
 |  16   return static_cast<PrecacheManager*>( | 
 |  17       GetInstance()->GetServiceForBrowserContext(browser_context, true)); | 
 |  18 } | 
 |  19  | 
 |  20 // static | 
 |  21 PrecacheManagerFactory* PrecacheManagerFactory::GetInstance() { | 
 |  22   return Singleton<PrecacheManagerFactory>::get(); | 
 |  23 } | 
 |  24  | 
 |  25 PrecacheManagerFactory::PrecacheManagerFactory() | 
 |  26     : BrowserContextKeyedServiceFactory( | 
 |  27           "PrecacheManager", BrowserContextDependencyManager::GetInstance()) {} | 
 |  28  | 
 |  29 PrecacheManagerFactory::~PrecacheManagerFactory() {} | 
 |  30  | 
 |  31 BrowserContextKeyedService* PrecacheManagerFactory::BuildServiceInstanceFor( | 
 |  32     content::BrowserContext* browser_context) const { | 
 |  33   return new PrecacheManager(browser_context); | 
 |  34 } | 
 |  35  | 
 |  36 }  // namespace precache | 
| OLD | NEW |