Autofill: code cleanup.
- Change some AutofillTable methds to return scoped_ptrs.
- Remove dead code.
- Add/update comments for constants copied to JS.
Review URL: https://codereview.chromium.org/1295963005
Cr-Commit-Position: refs/heads/master@{#344639}
diff --git a/components/webdata_services/web_data_service_wrapper.cc b/components/webdata_services/web_data_service_wrapper.cc
index d1aeea8..4de1cce6 100644
--- a/components/webdata_services/web_data_service_wrapper.cc
+++ b/components/webdata_services/web_data_service_wrapper.cc
@@ -69,21 +69,19 @@
const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
const scoped_refptr<base::SingleThreadTaskRunner>& db_thread,
const syncer::SyncableService::StartSyncFlare& flare,
- ShowErrorCallback show_error_callback) {
+ const ShowErrorCallback& show_error_callback) {
base::FilePath path = context_path.Append(kWebDataFilename);
web_database_ = new WebDatabaseService(path, ui_thread, db_thread);
// All tables objects that participate in managing the database must
// be added here.
- web_database_->AddTable(scoped_ptr<WebDatabaseTable>(
- new autofill::AutofillTable(application_locale)));
- web_database_->AddTable(scoped_ptr<WebDatabaseTable>(new KeywordTable()));
+ web_database_->AddTable(make_scoped_ptr(new autofill::AutofillTable));
+ web_database_->AddTable(make_scoped_ptr(new KeywordTable));
// TODO(mdm): We only really need the LoginsTable on Windows for IE7 password
// access, but for now, we still create it on all platforms since it deletes
// the old logins table. We can remove this after a while, e.g. in M22 or so.
- web_database_->AddTable(scoped_ptr<WebDatabaseTable>(new LoginsTable()));
- web_database_->AddTable(
- scoped_ptr<WebDatabaseTable>(new TokenServiceTable()));
+ web_database_->AddTable(make_scoped_ptr(new LoginsTable));
+ web_database_->AddTable(make_scoped_ptr(new TokenServiceTable));
web_database_->LoadDatabase();
autofill_web_data_ = new autofill::AutofillWebDataService(