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

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

Issue 2468723003: Move session service and supervised users to buildflags. (Closed)
Patch Set: Created 4 years, 1 month 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/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/autofill/personal_data_manager_factory.h" 8 #include "chrome/browser/autofill/personal_data_manager_factory.h"
9 #include "chrome/browser/browsing_data/browsing_data_remover.h" 9 #include "chrome/browser/browsing_data/browsing_data_remover.h"
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
(...skipping 14 matching lines...) Expand all
25 #if BUILDFLAG(ANDROID_JAVA_UI) 25 #if BUILDFLAG(ANDROID_JAVA_UI)
26 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" 26 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
27 #include "chrome/browser/precache/precache_manager_factory.h" 27 #include "chrome/browser/precache/precache_manager_factory.h"
28 #endif 28 #endif
29 29
30 #if defined(ENABLE_EXTENSIONS) 30 #if defined(ENABLE_EXTENSIONS)
31 #include "chrome/browser/extensions/activity_log/activity_log.h" 31 #include "chrome/browser/extensions/activity_log/activity_log.h"
32 #include "extensions/browser/extension_prefs_factory.h" 32 #include "extensions/browser/extension_prefs_factory.h"
33 #endif 33 #endif
34 34
35 #if defined(ENABLE_SESSION_SERVICE) 35 #if BUILDFLAG(ENABLE_SESSION_SERVICE)
36 #include "chrome/browser/sessions/session_service_factory.h" 36 #include "chrome/browser/sessions/session_service_factory.h"
37 #endif 37 #endif
38 38
39 // static 39 // static
40 BrowsingDataRemoverFactory* BrowsingDataRemoverFactory::GetInstance() { 40 BrowsingDataRemoverFactory* BrowsingDataRemoverFactory::GetInstance() {
41 return base::Singleton<BrowsingDataRemoverFactory>::get(); 41 return base::Singleton<BrowsingDataRemoverFactory>::get();
42 } 42 }
43 43
44 // static 44 // static
45 BrowsingDataRemover* BrowsingDataRemoverFactory::GetForBrowserContext( 45 BrowsingDataRemover* BrowsingDataRemoverFactory::GetForBrowserContext(
(...skipping 22 matching lines...) Expand all
68 #if BUILDFLAG(ANDROID_JAVA_UI) 68 #if BUILDFLAG(ANDROID_JAVA_UI)
69 DependsOn(offline_pages::OfflinePageModelFactory::GetInstance()); 69 DependsOn(offline_pages::OfflinePageModelFactory::GetInstance());
70 DependsOn(precache::PrecacheManagerFactory::GetInstance()); 70 DependsOn(precache::PrecacheManagerFactory::GetInstance());
71 #endif 71 #endif
72 72
73 #if defined(ENABLE_EXTENSIONS) 73 #if defined(ENABLE_EXTENSIONS)
74 DependsOn(extensions::ActivityLog::GetFactoryInstance()); 74 DependsOn(extensions::ActivityLog::GetFactoryInstance());
75 DependsOn(extensions::ExtensionPrefsFactory::GetInstance()); 75 DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
76 #endif 76 #endif
77 77
78 #if defined(ENABLE_SESSION_SERVICE) 78 #if BUILDFLAG(ENABLE_SESSION_SERVICE)
79 DependsOn(SessionServiceFactory::GetInstance()); 79 DependsOn(SessionServiceFactory::GetInstance());
80 #endif 80 #endif
81 } 81 }
82 82
83 BrowsingDataRemoverFactory::~BrowsingDataRemoverFactory() {} 83 BrowsingDataRemoverFactory::~BrowsingDataRemoverFactory() {}
84 84
85 content::BrowserContext* BrowsingDataRemoverFactory::GetBrowserContextToUse( 85 content::BrowserContext* BrowsingDataRemoverFactory::GetBrowserContextToUse(
86 content::BrowserContext* context) const { 86 content::BrowserContext* context) const {
87 // For guest profiles the browsing data is in the OTR profile. 87 // For guest profiles the browsing data is in the OTR profile.
88 Profile* profile = static_cast<Profile*>(context); 88 Profile* profile = static_cast<Profile*>(context);
89 DCHECK(!profile->IsGuestSession() || profile->IsOffTheRecord()); 89 DCHECK(!profile->IsGuestSession() || profile->IsOffTheRecord());
90 90
91 return profile; 91 return profile;
92 } 92 }
93 93
94 KeyedService* BrowsingDataRemoverFactory::BuildServiceInstanceFor( 94 KeyedService* BrowsingDataRemoverFactory::BuildServiceInstanceFor(
95 content::BrowserContext* context) const { 95 content::BrowserContext* context) const {
96 return new BrowsingDataRemover(context); 96 return new BrowsingDataRemover(context);
97 } 97 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698