diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 03:24:55 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 03:24:55 +0000 |
commit | d3d728e9b36811fb77d8176297d607c84e6a2d18 (patch) | |
tree | 200690d244f5ab82d30283dd0ec16052225d3281 /chrome/browser/sync/glue | |
parent | e3322f4b2588371b962b0a7da5fbede0ace0cdd8 (diff) | |
download | chromium_src-d3d728e9b36811fb77d8176297d607c84e6a2d18.zip chromium_src-d3d728e9b36811fb77d8176297d607c84e6a2d18.tar.gz chromium_src-d3d728e9b36811fb77d8176297d607c84e6a2d18.tar.bz2 |
This is stage 1 of transition to GUIDs as primary identifier for AutoFill profiles and credit cards.
The transition will look like this in terms of table migration:
Current:
CREATE TABLE autofill_profiles (
label VARCHAR,
unique_id INTEGER PRIMARY KEY,
first_name VARCHAR,
middle_name VARCHAR,
last_name VARCHAR,
email VARCHAR,
company_name VARCHAR,
address_line_1 VARCHAR,
address_line_2 VARCHAR,
city VARCHAR,
state VARCHAR,
zipcode VARCHAR,
country VARCHAR,
phone VARCHAR,
fax VARCHAR);
Transitional (adds guid column):
CREATE TABLE autofill_profiles (
label VARCHAR,
unique_id INTEGER PRIMARY KEY,
first_name VARCHAR,
middle_name VARCHAR,
last_name VARCHAR,
email VARCHAR,
company_name VARCHAR,
address_line_1 VARCHAR,
address_line_2 VARCHAR,
city VARCHAR,
state VARCHAR,
zipcode VARCHAR,
country VARCHAR,
phone VARCHAR,
fax VARCHAR,
guid VARCHAR NOT NULL); // <- add guid
End goal (in follow up CL):
CREATE TABLE autofill_profiles (
// remove label
// remove unique_id
guid VARCHAR NOT NULL PRIMARY KEY // <- reorder guid, make primary
first_name VARCHAR,
middle_name VARCHAR,
last_name VARCHAR,
email VARCHAR,
company_name VARCHAR,
address_line_1 VARCHAR,
address_line_2 VARCHAR,
city VARCHAR,
state VARCHAR,
zipcode VARCHAR,
country VARCHAR,
phone VARCHAR,
fax VARCHAR);
And similarly for the credit_cards table.
BUG=58813
TEST=AutoFillProfileTest.Compare, GUIDTest.GUIDCorrectlyFormatted, WebDataServiceAutofillTest.ProfileRemoveGUID, WebDataServiceAutofillTest.CreditCardRemoveGUID, WebDatabaseTest.AutoFillProfile, WebDatabaseTest.CreditCard, WebDatabaseMigrationTest.MigrateVersion30ToCurrent
Review URL: http://codereview.chromium.org/3760009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue')
-rw-r--r-- | chrome/browser/sync/glue/autofill_model_associator.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/sync/glue/autofill_model_associator.cc b/chrome/browser/sync/glue/autofill_model_associator.cc index e3fac11..9efa191 100644 --- a/chrome/browser/sync/glue/autofill_model_associator.cc +++ b/chrome/browser/sync/glue/autofill_model_associator.cc @@ -130,6 +130,8 @@ bool AutofillModelAssociator::TraverseAndAssociateChromeAutoFillProfiles( return false; } tag = ProfileLabelToTag(label); + // TODO(dhollowa): Replace with |AutoFillProfile::set_guid|. + // http://crbug.com/58813 (*ix)->set_label(label); if (!MakeNewAutofillProfileSyncNode(write_trans, autofill_root, tag, **ix, &sync_id)) { |