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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover_factory.cc

Issue 2731523004: Fix invalid cast to BrowsingDataRemoverImpl (Closed)
Patch Set: move KeyedService inheritance to BrowsingDataRemover Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/browsing_data/browsing_data_remover_factory.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover_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 "chrome/browser/autofill/personal_data_manager_factory.h" 9 #include "chrome/browser/autofill/personal_data_manager_factory.h"
10 #include "chrome/browser/browsing_data/browsing_data_remover_impl.h" 10 #include "chrome/browser/browsing_data/browsing_data_remover_impl.h"
(...skipping 28 matching lines...) Expand all
39 #endif 39 #endif
40 40
41 // static 41 // static
42 BrowsingDataRemoverFactory* BrowsingDataRemoverFactory::GetInstance() { 42 BrowsingDataRemoverFactory* BrowsingDataRemoverFactory::GetInstance() {
43 return base::Singleton<BrowsingDataRemoverFactory>::get(); 43 return base::Singleton<BrowsingDataRemoverFactory>::get();
44 } 44 }
45 45
46 // static 46 // static
47 BrowsingDataRemover* BrowsingDataRemoverFactory::GetForBrowserContext( 47 BrowsingDataRemover* BrowsingDataRemoverFactory::GetForBrowserContext(
48 content::BrowserContext* context) { 48 content::BrowserContext* context) {
49 return static_cast<BrowsingDataRemoverImpl*>( 49 return static_cast<BrowsingDataRemover*>(
50 GetInstance()->GetServiceForBrowserContext(context, true)); 50 GetInstance()->GetServiceForBrowserContext(context, true));
51 } 51 }
52 52
53 BrowsingDataRemoverFactory::BrowsingDataRemoverFactory() 53 BrowsingDataRemoverFactory::BrowsingDataRemoverFactory()
54 : BrowserContextKeyedServiceFactory( 54 : BrowserContextKeyedServiceFactory(
55 "BrowsingDataRemover", 55 "BrowsingDataRemover",
56 BrowserContextDependencyManager::GetInstance()) { 56 BrowserContextDependencyManager::GetInstance()) {
57 DependsOn(autofill::PersonalDataManagerFactory::GetInstance()); 57 DependsOn(autofill::PersonalDataManagerFactory::GetInstance());
58 DependsOn(DataReductionProxyChromeSettingsFactory::GetInstance()); 58 DependsOn(DataReductionProxyChromeSettingsFactory::GetInstance());
59 DependsOn(domain_reliability::DomainReliabilityServiceFactory::GetInstance()); 59 DependsOn(domain_reliability::DomainReliabilityServiceFactory::GetInstance());
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return profile; 92 return profile;
93 } 93 }
94 94
95 KeyedService* BrowsingDataRemoverFactory::BuildServiceInstanceFor( 95 KeyedService* BrowsingDataRemoverFactory::BuildServiceInstanceFor(
96 content::BrowserContext* context) const { 96 content::BrowserContext* context) const {
97 BrowsingDataRemoverImpl* remover = new BrowsingDataRemoverImpl(context); 97 BrowsingDataRemoverImpl* remover = new BrowsingDataRemoverImpl(context);
98 remover->SetEmbedderDelegate( 98 remover->SetEmbedderDelegate(
99 base::MakeUnique<ChromeBrowsingDataRemoverDelegate>(context)); 99 base::MakeUnique<ChromeBrowsingDataRemoverDelegate>(context));
100 return remover; 100 return remover;
101 } 101 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.h ('k') | chrome/browser/browsing_data/browsing_data_remover_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698