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

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

Issue 13191007: Pass app_locale directly to AutofillTable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chrome frame tests fix Created 7 years, 9 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 b2197ee34999ae2d21f28c3aadfd28bf1f75ee39..7635940879cbbfcf025089287c1ce482c8c8b8d9 100644
--- a/chrome/browser/webdata/autofill_table.h
+++ b/chrome/browser/webdata/autofill_table.h
@@ -125,7 +125,6 @@ class AutofillTable : public WebDatabaseTable {
virtual bool Init(sql::Connection* db, sql::MetaTable* meta_table) OVERRIDE;
virtual bool IsSyncable() OVERRIDE;
virtual bool MigrateToVersion(int version,
- const std::string& app_locale,
bool* update_compatible_version) OVERRIDE;
// Records the form elements in |elements| in the database in the
@@ -298,8 +297,7 @@ class AutofillTable : public WebDatabaseTable {
bool MigrateToVersion31AddGUIDToCreditCardsAndProfiles();
bool MigrateToVersion32UpdateProfilesAndCreditCards();
bool MigrateToVersion33ProfilesBasedOnFirstName();
- bool MigrateToVersion34ProfilesBasedOnCountryCode(
- const std::string& app_locale);
+ bool MigrateToVersion34ProfilesBasedOnCountryCode();
bool MigrateToVersion35GreatBritainCountryCodes();
bool MigrateToVersion37MergeAndCullOlderProfiles();
@@ -356,6 +354,12 @@ class AutofillTable : public WebDatabaseTable {
bool InitProfilePhonesTable();
bool InitProfileTrashTable();
+ // The application locale. The locale is needed for the migration to version
+ // 35. Since it must be read on the UI thread, it is set when the table is
+ // created (on the UI thread), and cached here so that it can be used for
+ // migrations (on the DB thread).
+ std::string app_locale_;
+
DISALLOW_COPY_AND_ASSIGN(AutofillTable);
};
« no previous file with comments | « chrome/browser/password_manager/password_store_win_unittest.cc ('k') | chrome/browser/webdata/autofill_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698