OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sync/glue/autofill_data_type_controller.h" | 5 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/sync/profile_sync_components_factory.h" | 10 #include "chrome/browser/sync/profile_sync_components_factory.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 cull_expired_entries, | 100 cull_expired_entries, |
101 web_data_service)); | 101 web_data_service)); |
102 NonUIDataTypeController::StartAssociating(start_callback); | 102 NonUIDataTypeController::StartAssociating(start_callback); |
103 } | 103 } |
104 | 104 |
105 void AutofillDataTypeController::UpdateAutofillCullingSettings( | 105 void AutofillDataTypeController::UpdateAutofillCullingSettings( |
106 bool cull_expired_entries, | 106 bool cull_expired_entries, |
107 scoped_refptr<autofill::AutofillWebDataService> web_data_service) { | 107 scoped_refptr<autofill::AutofillWebDataService> web_data_service) { |
108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
109 AutocompleteSyncableService* service = | 109 AutocompleteSyncableService* service = |
110 AutocompleteSyncableService::FromWebDataService(web_data_service); | 110 AutocompleteSyncableService::FromWebDataService(web_data_service.get()); |
111 if (!service) { | 111 if (!service) { |
112 DVLOG(1) << "Can't update culling, no AutocompleteSyncableService."; | 112 DVLOG(1) << "Can't update culling, no AutocompleteSyncableService."; |
113 return; | 113 return; |
114 } | 114 } |
115 | 115 |
116 service->UpdateCullSetting(cull_expired_entries); | 116 service->UpdateCullSetting(cull_expired_entries); |
117 } | 117 } |
118 | 118 |
119 } // namespace browser_sync | 119 } // namespace browser_sync |
OLD | NEW |