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 "ios/chrome/browser/browsing_data/ios_browsing_data_counter_factory.h" | 5 #include "ios/chrome/browser/browsing_data/ios_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 "components/browser_sync/profile_sync_service.h" | 10 #include "components/browser_sync/profile_sync_service.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 base::Unretained(browser_state)), | 39 base::Unretained(browser_state)), |
40 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state)); | 40 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state)); |
41 } | 41 } |
42 | 42 |
43 if (pref_name == browsing_data::prefs::kDeleteCache) | 43 if (pref_name == browsing_data::prefs::kDeleteCache) |
44 return base::MakeUnique<CacheCounter>(browser_state); | 44 return base::MakeUnique<CacheCounter>(browser_state); |
45 | 45 |
46 if (pref_name == browsing_data::prefs::kDeletePasswords) { | 46 if (pref_name == browsing_data::prefs::kDeletePasswords) { |
47 return base::MakeUnique<browsing_data::PasswordsCounter>( | 47 return base::MakeUnique<browsing_data::PasswordsCounter>( |
48 IOSChromePasswordStoreFactory::GetForBrowserState( | 48 IOSChromePasswordStoreFactory::GetForBrowserState( |
49 browser_state, ServiceAccessType::EXPLICIT_ACCESS)); | 49 browser_state, ServiceAccessType::EXPLICIT_ACCESS), |
| 50 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state)); |
50 } | 51 } |
51 | 52 |
52 if (pref_name == browsing_data::prefs::kDeleteFormData) { | 53 if (pref_name == browsing_data::prefs::kDeleteFormData) { |
53 return base::MakeUnique<browsing_data::AutofillCounter>( | 54 return base::MakeUnique<browsing_data::AutofillCounter>( |
54 ios::WebDataServiceFactory::GetAutofillWebDataForBrowserState( | 55 ios::WebDataServiceFactory::GetAutofillWebDataForBrowserState( |
55 browser_state, ServiceAccessType::EXPLICIT_ACCESS)); | 56 browser_state, ServiceAccessType::EXPLICIT_ACCESS)); |
56 } | 57 } |
57 | 58 |
58 return nullptr; | 59 return nullptr; |
59 } | 60 } |
OLD | NEW |