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

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

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge 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"
11 #include "chrome/browser/domain_reliability/service_factory.h" 11 #include "chrome/browser/domain_reliability/service_factory.h"
12 #include "chrome/browser/history/history_service_factory.h" 12 #include "chrome/browser/history/history_service_factory.h"
13 #include "chrome/browser/history/web_history_service_factory.h" 13 #include "chrome/browser/history/web_history_service_factory.h"
14 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 14 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
15 #include "chrome/browser/password_manager/password_store_factory.h" 15 #include "chrome/browser/password_manager/password_store_factory.h"
16 #include "chrome/browser/prerender/prerender_manager_factory.h" 16 #include "chrome/browser/prerender/prerender_manager_factory.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/search_engines/template_url_service_factory.h" 18 #include "chrome/browser/search_engines/template_url_service_factory.h"
19 #include "chrome/browser/sessions/tab_restore_service_factory.h" 19 #include "chrome/browser/sessions/tab_restore_service_factory.h"
20 #include "chrome/browser/web_data_service_factory.h" 20 #include "chrome/browser/web_data_service_factory.h"
21 #include "components/keyed_service/content/browser_context_dependency_manager.h" 21 #include "components/keyed_service/content/browser_context_dependency_manager.h"
22 #include "components/power/origin_power_map_factory.h" 22 #include "components/power/origin_power_map_factory.h"
23 #include "content/public/browser/browser_context.h" 23 #include "content/public/browser/browser_context.h"
24 #include "extensions/features/features.h"
24 25
25 #if BUILDFLAG(ANDROID_JAVA_UI) 26 #if BUILDFLAG(ANDROID_JAVA_UI)
26 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" 27 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
27 #include "chrome/browser/precache/precache_manager_factory.h" 28 #include "chrome/browser/precache/precache_manager_factory.h"
28 #endif 29 #endif
29 30
30 #if defined(ENABLE_EXTENSIONS) 31 #if BUILDFLAG(ENABLE_EXTENSIONS)
31 #include "chrome/browser/extensions/activity_log/activity_log.h" 32 #include "chrome/browser/extensions/activity_log/activity_log.h"
32 #include "extensions/browser/extension_prefs_factory.h" 33 #include "extensions/browser/extension_prefs_factory.h"
33 #endif 34 #endif
34 35
35 #if BUILDFLAG(ENABLE_SESSION_SERVICE) 36 #if BUILDFLAG(ENABLE_SESSION_SERVICE)
36 #include "chrome/browser/sessions/session_service_factory.h" 37 #include "chrome/browser/sessions/session_service_factory.h"
37 #endif 38 #endif
38 39
39 // static 40 // static
40 BrowsingDataRemoverFactory* BrowsingDataRemoverFactory::GetInstance() { 41 BrowsingDataRemoverFactory* BrowsingDataRemoverFactory::GetInstance() {
(...skipping 22 matching lines...) Expand all
63 DependsOn(TabRestoreServiceFactory::GetInstance()); 64 DependsOn(TabRestoreServiceFactory::GetInstance());
64 DependsOn(TemplateURLServiceFactory::GetInstance()); 65 DependsOn(TemplateURLServiceFactory::GetInstance());
65 DependsOn(WebDataServiceFactory::GetInstance()); 66 DependsOn(WebDataServiceFactory::GetInstance());
66 DependsOn(WebHistoryServiceFactory::GetInstance()); 67 DependsOn(WebHistoryServiceFactory::GetInstance());
67 68
68 #if BUILDFLAG(ANDROID_JAVA_UI) 69 #if BUILDFLAG(ANDROID_JAVA_UI)
69 DependsOn(offline_pages::OfflinePageModelFactory::GetInstance()); 70 DependsOn(offline_pages::OfflinePageModelFactory::GetInstance());
70 DependsOn(precache::PrecacheManagerFactory::GetInstance()); 71 DependsOn(precache::PrecacheManagerFactory::GetInstance());
71 #endif 72 #endif
72 73
73 #if defined(ENABLE_EXTENSIONS) 74 #if BUILDFLAG(ENABLE_EXTENSIONS)
74 DependsOn(extensions::ActivityLog::GetFactoryInstance()); 75 DependsOn(extensions::ActivityLog::GetFactoryInstance());
75 DependsOn(extensions::ExtensionPrefsFactory::GetInstance()); 76 DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
76 #endif 77 #endif
77 78
78 #if BUILDFLAG(ENABLE_SESSION_SERVICE) 79 #if BUILDFLAG(ENABLE_SESSION_SERVICE)
79 DependsOn(SessionServiceFactory::GetInstance()); 80 DependsOn(SessionServiceFactory::GetInstance());
80 #endif 81 #endif
81 } 82 }
82 83
83 BrowsingDataRemoverFactory::~BrowsingDataRemoverFactory() {} 84 BrowsingDataRemoverFactory::~BrowsingDataRemoverFactory() {}
84 85
85 content::BrowserContext* BrowsingDataRemoverFactory::GetBrowserContextToUse( 86 content::BrowserContext* BrowsingDataRemoverFactory::GetBrowserContextToUse(
86 content::BrowserContext* context) const { 87 content::BrowserContext* context) const {
87 // For guest profiles the browsing data is in the OTR profile. 88 // For guest profiles the browsing data is in the OTR profile.
88 Profile* profile = static_cast<Profile*>(context); 89 Profile* profile = static_cast<Profile*>(context);
89 DCHECK(!profile->IsGuestSession() || profile->IsOffTheRecord()); 90 DCHECK(!profile->IsGuestSession() || profile->IsOffTheRecord());
90 91
91 return profile; 92 return profile;
92 } 93 }
93 94
94 KeyedService* BrowsingDataRemoverFactory::BuildServiceInstanceFor( 95 KeyedService* BrowsingDataRemoverFactory::BuildServiceInstanceFor(
95 content::BrowserContext* context) const { 96 content::BrowserContext* context) const {
96 return new BrowsingDataRemover(context); 97 return new BrowsingDataRemover(context);
97 } 98 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698