| Index: chrome/browser/sync/util/user_settings.cc
|
| diff --git a/chrome/browser/sync/util/user_settings.cc b/chrome/browser/sync/util/user_settings.cc
|
| index 043d532bddc514c3c55bff8415d4233eeffa8de6..f8ac69b00c7272c3e8c2c0684ad89e523497b6c6 100644
|
| --- a/chrome/browser/sync/util/user_settings.cc
|
| +++ b/chrome/browser/sync/util/user_settings.cc
|
| @@ -69,7 +69,7 @@ static const char PASSWORD_HASH[] = "password_hash2";
|
| static const char SALT[] = "salt2";
|
|
|
| static const int kSaltSize = 20;
|
| -static const int kCurrentDBVersion = 11;
|
| +static const int kCurrentDBVersion = 12;
|
|
|
| UserSettings::ScopedDBHandle::ScopedDBHandle(UserSettings* settings)
|
| : mutex_lock_(settings->dbhandle_mutex_), handle_(&settings->dbhandle_) {
|
| @@ -138,6 +138,10 @@ void UserSettings::MigrateOldVersionsAsNeeded(sqlite3* const handle,
|
| ExecOrDie(handle, "DROP TABLE shares");
|
| ExecOrDie(handle, "UPDATE db_version SET version = 11");
|
| // FALL THROUGH
|
| + case 11:
|
| + ExecOrDie(handle, "DROP TABLE signin_types");
|
| + ExecOrDie(handle, "UPDATE db_version SET version = 12");
|
| + // FALL THROUGH
|
| case kCurrentDBVersion:
|
| // Nothing to migrate.
|
| return;
|
| @@ -154,15 +158,6 @@ static void MakeCookiesTable(sqlite3* const dbhandle) {
|
| " PRIMARY KEY(email, service_name) ON CONFLICT REPLACE)");
|
| }
|
|
|
| -static void MakeSigninTypesTable(sqlite3* const dbhandle) {
|
| - // With every successful gaia authentication, remember if it was
|
| - // a hosted domain or not.
|
| - ExecOrDie(dbhandle,
|
| - "CREATE TABLE signin_types"
|
| - " (signin, signin_type, "
|
| - " PRIMARY KEY(signin, signin_type) ON CONFLICT REPLACE)");
|
| -}
|
| -
|
| static void MakeClientIDTable(sqlite3* const dbhandle) {
|
| // Stores a single client ID value that can be used as the client id, if
|
| // there's not another such ID provided on the install.
|
| @@ -247,7 +242,6 @@ bool UserSettings::Init(const FilePath& settings_path) {
|
|
|
| MakeSigninsTable(dbhandle.get());
|
| MakeCookiesTable(dbhandle.get());
|
| - MakeSigninTypesTable(dbhandle.get());
|
| MakeClientIDTable(dbhandle.get());
|
| }
|
| transaction.Commit();
|
| @@ -429,35 +423,6 @@ void UserSettings::SwitchUser(const string& username) {
|
| }
|
| }
|
|
|
| -void UserSettings::RememberSigninType(const string& signin,
|
| - gaia::SignIn signin_type) {
|
| - ScopedDBHandle dbhandle(this);
|
| - SQLStatement statement;
|
| - statement.prepare(dbhandle.get(),
|
| - "INSERT INTO signin_types(signin, signin_type)"
|
| - " values ( ?, ? )");
|
| - statement.bind_string(0, signin);
|
| - statement.bind_int(1, static_cast<int>(signin_type));
|
| - if (SQLITE_DONE != statement.step()) {
|
| - LOG(FATAL) << sqlite3_errmsg(dbhandle.get());
|
| - }
|
| -}
|
| -
|
| -gaia::SignIn UserSettings::RecallSigninType(const string& signin,
|
| - gaia::SignIn default_type) {
|
| - ScopedDBHandle dbhandle(this);
|
| - SQLStatement statement;
|
| - statement.prepare(dbhandle.get(),
|
| - "SELECT signin_type from signin_types WHERE signin = ?");
|
| - statement.bind_string(0, signin);
|
| - int query_result = statement.step();
|
| - if (SQLITE_ROW == query_result) {
|
| - int signin_type = statement.column_int(0);
|
| - return static_cast<gaia::SignIn>(signin_type);
|
| - }
|
| - return default_type;
|
| -}
|
| -
|
| string UserSettings::GetClientId() {
|
| ScopedDBHandle dbhandle(this);
|
| SQLStatement statement;
|
|
|