summaryrefslogtreecommitdiffstats
path: root/chrome/browser/guid.h
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 03:24:55 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 03:24:55 +0000
commitd3d728e9b36811fb77d8176297d607c84e6a2d18 (patch)
tree200690d244f5ab82d30283dd0ec16052225d3281 /chrome/browser/guid.h
parente3322f4b2588371b962b0a7da5fbede0ace0cdd8 (diff)
downloadchromium_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/guid.h')
-rw-r--r--chrome/browser/guid.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/guid.h b/chrome/browser/guid.h
index bc47ed8..b5aa67d 100644
--- a/chrome/browser/guid.h
+++ b/chrome/browser/guid.h
@@ -19,6 +19,9 @@ namespace guid {
// the GUID. The Windows implementation uses system services.
std::string GenerateGUID();
+// Returns true if the input string conforms to the GUID format.
+bool IsValidGUID(const std::string& guid);
+
#if defined(OS_POSIX)
// For unit testing purposes only. Do not use outside of tests.
std::string RandomDataToGUIDString(const uint64 bytes[2]);