| OLD | NEW |
| 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/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/browsing_data/autofill_counter.h" | 8 #include "chrome/browser/browsing_data/autofill_counter.h" |
| 9 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h" | 9 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h" |
| 10 #include "chrome/browser/browsing_data/cache_counter.h" | 10 #include "chrome/browser/browsing_data/cache_counter.h" |
| 11 #include "chrome/browser/browsing_data/downloads_counter.h" | 11 #include "chrome/browser/browsing_data/downloads_counter.h" |
| 12 #include "chrome/browser/browsing_data/history_counter.h" | 12 #include "chrome/browser/browsing_data/history_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/browsing_data/passwords_counter.h" | 14 #include "chrome/browser/browsing_data/passwords_counter.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "components/browsing_data/counters/browsing_data_counter.h" | 16 #include "components/browsing_data/core/counters/browsing_data_counter.h" |
| 17 #include "components/browsing_data/pref_names.h" | 17 #include "components/browsing_data/core/pref_names.h" |
| 18 | 18 |
| 19 #if defined(ENABLE_EXTENSIONS) | 19 #if defined(ENABLE_EXTENSIONS) |
| 20 #include "chrome/browser/browsing_data/hosted_apps_counter.h" | 20 #include "chrome/browser/browsing_data/hosted_apps_counter.h" |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 // static | 23 // static |
| 24 std::unique_ptr<browsing_data::BrowsingDataCounter> | 24 std::unique_ptr<browsing_data::BrowsingDataCounter> |
| 25 BrowsingDataCounterFactory::GetForProfileAndPref(Profile* profile, | 25 BrowsingDataCounterFactory::GetForProfileAndPref(Profile* profile, |
| 26 const std::string& pref_name) { | 26 const std::string& pref_name) { |
| 27 if (!AreCountersEnabled()) | 27 if (!AreCountersEnabled()) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 45 if (pref_name == browsing_data::prefs::kDeleteMediaLicenses) | 45 if (pref_name == browsing_data::prefs::kDeleteMediaLicenses) |
| 46 return base::MakeUnique<MediaLicensesCounter>(profile); | 46 return base::MakeUnique<MediaLicensesCounter>(profile); |
| 47 | 47 |
| 48 #if defined(ENABLE_EXTENSIONS) | 48 #if defined(ENABLE_EXTENSIONS) |
| 49 if (pref_name == browsing_data::prefs::kDeleteHostedAppsData) | 49 if (pref_name == browsing_data::prefs::kDeleteHostedAppsData) |
| 50 return base::MakeUnique<HostedAppsCounter>(profile); | 50 return base::MakeUnique<HostedAppsCounter>(profile); |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 return nullptr; | 53 return nullptr; |
| 54 } | 54 } |
| OLD | NEW |