| 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/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" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 if (pref_name == browsing_data::prefs::kDeletePasswords) { | 77 if (pref_name == browsing_data::prefs::kDeletePasswords) { |
| 78 return base::MakeUnique<browsing_data::PasswordsCounter>( | 78 return base::MakeUnique<browsing_data::PasswordsCounter>( |
| 79 PasswordStoreFactory::GetForProfile(profile, | 79 PasswordStoreFactory::GetForProfile(profile, |
| 80 ServiceAccessType::EXPLICIT_ACCESS), | 80 ServiceAccessType::EXPLICIT_ACCESS), |
| 81 ProfileSyncServiceFactory::GetForProfile(profile)); | 81 ProfileSyncServiceFactory::GetForProfile(profile)); |
| 82 } | 82 } |
| 83 | 83 |
| 84 if (pref_name == browsing_data::prefs::kDeleteFormData) { | 84 if (pref_name == browsing_data::prefs::kDeleteFormData) { |
| 85 return base::MakeUnique<browsing_data::AutofillCounter>( | 85 return base::MakeUnique<browsing_data::AutofillCounter>( |
| 86 WebDataServiceFactory::GetAutofillWebDataForProfile( | 86 WebDataServiceFactory::GetAutofillWebDataForProfile( |
| 87 profile, ServiceAccessType::EXPLICIT_ACCESS)); | 87 profile, ServiceAccessType::EXPLICIT_ACCESS), |
| 88 ProfileSyncServiceFactory::GetForProfile(profile)); |
| 88 } | 89 } |
| 89 | 90 |
| 90 if (pref_name == browsing_data::prefs::kDeleteDownloadHistory) | 91 if (pref_name == browsing_data::prefs::kDeleteDownloadHistory) |
| 91 return base::MakeUnique<DownloadsCounter>(profile); | 92 return base::MakeUnique<DownloadsCounter>(profile); |
| 92 | 93 |
| 93 if (pref_name == browsing_data::prefs::kDeleteMediaLicenses) | 94 if (pref_name == browsing_data::prefs::kDeleteMediaLicenses) |
| 94 return base::MakeUnique<MediaLicensesCounter>(profile); | 95 return base::MakeUnique<MediaLicensesCounter>(profile); |
| 95 | 96 |
| 96 #if BUILDFLAG(ENABLE_EXTENSIONS) | 97 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 97 if (pref_name == browsing_data::prefs::kDeleteHostedAppsData) | 98 if (pref_name == browsing_data::prefs::kDeleteHostedAppsData) |
| 98 return base::MakeUnique<HostedAppsCounter>(profile); | 99 return base::MakeUnique<HostedAppsCounter>(profile); |
| 99 #endif | 100 #endif |
| 100 | 101 |
| 101 return nullptr; | 102 return nullptr; |
| 102 } | 103 } |
| OLD | NEW |