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

Unified Diff: chrome/browser/webdata/autofill_table.h

Issue 8184001: The AutofillProfileSyncableService's lifetime should be managed by the WebDataService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ensure that destruction occurs on the DB thread Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/webdata/autofill_table.h
diff --git a/chrome/browser/webdata/autofill_table.h b/chrome/browser/webdata/autofill_table.h
index aceef0bcf4d82be19cad79ba2f2f84f70ab50468..25140ea96fb6c8727e5ff28e04156c1391dc507c 100644
--- a/chrome/browser/webdata/autofill_table.h
+++ b/chrome/browser/webdata/autofill_table.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/gtest_prod_util.h"
+#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
#include "chrome/browser/webdata/web_database_table.h"
@@ -15,8 +16,11 @@
class AutofillChange;
class AutofillEntry;
class AutofillProfile;
+class AutofillProfileSyncableService;
class AutofillTableTest;
class CreditCard;
+class Profile;
+class WebDatabase;
namespace base {
class Time;
@@ -116,12 +120,17 @@ struct FormField;
//
class AutofillTable : public WebDatabaseTable {
public:
- AutofillTable(sql::Connection* db, sql::MetaTable* meta_table)
- : WebDatabaseTable(db, meta_table) {}
- virtual ~AutofillTable() {}
+ AutofillTable(sql::Connection* db, sql::MetaTable* meta_table);
+ virtual ~AutofillTable();
virtual bool Init();
virtual bool IsSyncable();
+ // TODO(georgey): Add support for autocomplete as well: http://crbug.com/95759
+ // Returns the syncable service for Autofill addresses and credit cards stored
+ // in this table.
+ AutofillProfileSyncableService* GetSyncableService(WebDatabase* web_database,
+ Profile* profile);
+
// Records the form elements in |elements| in the database in the
// autofill table. A list of all added and updated autofill entries
// is returned in the changes out parameter.
@@ -330,6 +339,8 @@ class AutofillTable : public WebDatabaseTable {
bool InitProfilePhonesTable();
bool InitProfileTrashTable();
+ scoped_ptr<AutofillProfileSyncableService> autofill_profile_syncable_service_;
+
DISALLOW_COPY_AND_ASSIGN(AutofillTable);
};

Powered by Google App Engine
This is Rietveld 408576698