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

Side by Side Diff: chrome/browser/sync/glue/autofill_data_type_controller.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698