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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_counter_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_counter_factory.h" 5 #include "chrome/browser/browsing_data/browsing_data_counter_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h" 10 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h"
11 #include "chrome/browser/browsing_data/cache_counter.h" 11 #include "chrome/browser/browsing_data/cache_counter.h"
12 #include "chrome/browser/browsing_data/downloads_counter.h" 12 #include "chrome/browser/browsing_data/downloads_counter.h"
13 #include "chrome/browser/browsing_data/media_licenses_counter.h" 13 #include "chrome/browser/browsing_data/media_licenses_counter.h"
14 #include "chrome/browser/history/history_service_factory.h" 14 #include "chrome/browser/history/history_service_factory.h"
15 #include "chrome/browser/history/web_history_service_factory.h" 15 #include "chrome/browser/history/web_history_service_factory.h"
16 #include "chrome/browser/password_manager/password_store_factory.h" 16 #include "chrome/browser/password_manager/password_store_factory.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/sync/profile_sync_service_factory.h" 18 #include "chrome/browser/sync/profile_sync_service_factory.h"
19 #include "chrome/browser/web_data_service_factory.h" 19 #include "chrome/browser/web_data_service_factory.h"
20 #include "components/browser_sync/profile_sync_service.h" 20 #include "components/browser_sync/profile_sync_service.h"
21 #include "components/browsing_data/core/counters/autofill_counter.h" 21 #include "components/browsing_data/core/counters/autofill_counter.h"
22 #include "components/browsing_data/core/counters/browsing_data_counter.h" 22 #include "components/browsing_data/core/counters/browsing_data_counter.h"
23 #include "components/browsing_data/core/counters/history_counter.h" 23 #include "components/browsing_data/core/counters/history_counter.h"
24 #include "components/browsing_data/core/counters/passwords_counter.h" 24 #include "components/browsing_data/core/counters/passwords_counter.h"
25 #include "components/browsing_data/core/pref_names.h" 25 #include "components/browsing_data/core/pref_names.h"
26 #include "components/history/core/browser/web_history_service.h" 26 #include "components/history/core/browser/web_history_service.h"
27 #include "components/password_manager/core/browser/password_store.h" 27 #include "components/password_manager/core/browser/password_store.h"
28 #include "extensions/features/features.h"
28 29
29 #if defined(ENABLE_EXTENSIONS) 30 #if BUILDFLAG(ENABLE_EXTENSIONS)
30 #include "chrome/browser/browsing_data/hosted_apps_counter.h" 31 #include "chrome/browser/browsing_data/hosted_apps_counter.h"
31 #endif 32 #endif
32 33
33 namespace { 34 namespace {
34 35
35 history::WebHistoryService* GetUpdatedWebHistoryService(Profile* profile) { 36 history::WebHistoryService* GetUpdatedWebHistoryService(Profile* profile) {
36 return WebHistoryServiceFactory::GetForProfile(profile); 37 return WebHistoryServiceFactory::GetForProfile(profile);
37 } 38 }
38 39
39 } // namespace 40 } // namespace
(...skipping 28 matching lines...) Expand all
68 WebDataServiceFactory::GetAutofillWebDataForProfile( 69 WebDataServiceFactory::GetAutofillWebDataForProfile(
69 profile, ServiceAccessType::EXPLICIT_ACCESS)); 70 profile, ServiceAccessType::EXPLICIT_ACCESS));
70 } 71 }
71 72
72 if (pref_name == browsing_data::prefs::kDeleteDownloadHistory) 73 if (pref_name == browsing_data::prefs::kDeleteDownloadHistory)
73 return base::MakeUnique<DownloadsCounter>(profile); 74 return base::MakeUnique<DownloadsCounter>(profile);
74 75
75 if (pref_name == browsing_data::prefs::kDeleteMediaLicenses) 76 if (pref_name == browsing_data::prefs::kDeleteMediaLicenses)
76 return base::MakeUnique<MediaLicensesCounter>(profile); 77 return base::MakeUnique<MediaLicensesCounter>(profile);
77 78
78 #if defined(ENABLE_EXTENSIONS) 79 #if BUILDFLAG(ENABLE_EXTENSIONS)
79 if (pref_name == browsing_data::prefs::kDeleteHostedAppsData) 80 if (pref_name == browsing_data::prefs::kDeleteHostedAppsData)
80 return base::MakeUnique<HostedAppsCounter>(profile); 81 return base::MakeUnique<HostedAppsCounter>(profile);
81 #endif 82 #endif
82 83
83 return nullptr; 84 return nullptr;
84 } 85 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/browsing_data/browsing_data_counter_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698