Lines Matching refs:db_
419 s.Assign(db_->GetUniqueStatement(
436 s.Assign(db_->GetUniqueStatement(
467 sql::Statement s(db_->GetUniqueStatement(
516 sql::Statement s(db_->GetUniqueStatement(
530 *how_many = db_->GetLastChangeCount();
560 sql::Statement s(db_->GetUniqueStatement(
583 sql::Statement s(db_->GetUniqueStatement(
600 sql::Statement s(db_->GetUniqueStatement(
619 sql::Statement s(db_->GetUniqueStatement(
635 *pair_id = db_->GetLastInsertRowId();
641 sql::Statement s(db_->GetUniqueStatement(
684 sql::Statement s(db_->GetUniqueStatement(
707 sql::Statement s(db_->GetUniqueStatement(
765 sql::Statement s(db_->GetUniqueStatement(
793 sql::Statement s(db_->GetUniqueStatement(sql.c_str()));
819 sql::Statement s(db_->GetUniqueStatement(sql.c_str()));
835 int64 pair_id = db_->GetLastInsertRowId();
874 sql::Statement s(db_->GetUniqueStatement(
892 sql::Statement s(db_->GetUniqueStatement(
912 return AddAutofillProfilePieces(profile, db_);
919 sql::Statement s(db_->GetUniqueStatement(
939 AddAutofillProfileNamesToProfile(db_, p.get());
942 AddAutofillProfileEmailsToProfile(db_, p.get());
945 AddAutofillProfilePhonesToProfile(db_, p.get());
948 AddAutofillProfileFaxesToProfile(db_, p.get());
959 sql::Statement s(db_->GetUniqueStatement(
1034 sql::Statement s(db_->GetUniqueStatement(
1048 DCHECK_GT(db_->GetLastChangeCount(), 0);
1053 if (!RemoveAutofillProfilePieces(profile.guid(), db_))
1056 return AddAutofillProfilePieces(profile, db_);
1063 sql::Statement s_trash(db_->GetUniqueStatement(
1078 sql::Statement s(db_->GetUniqueStatement(
1089 return RemoveAutofillProfilePieces(guid, db_);
1093 sql::Statement s1(db_->GetUniqueStatement(
1103 sql::Statement s2(db_->GetUniqueStatement(
1113 sql::Statement s3(db_->GetUniqueStatement(
1123 sql::Statement s4(db_->GetUniqueStatement(
1137 sql::Statement s(db_->GetUniqueStatement(
1154 DCHECK_GT(db_->GetLastChangeCount(), 0);
1161 sql::Statement s(db_->GetUniqueStatement(
1185 sql::Statement s(db_->GetUniqueStatement(
1216 sql::Statement s(db_->GetUniqueStatement(
1229 DCHECK_GT(db_->GetLastChangeCount(), 0);
1235 sql::Statement s(db_->GetUniqueStatement(
1259 sql::Statement s_profiles_get(db_->GetUniqueStatement(
1276 sql::Statement s_profiles(db_->GetUniqueStatement(
1294 sql::Statement s_credit_cards_get(db_->GetUniqueStatement(
1311 sql::Statement s_credit_cards(db_->GetUniqueStatement(
1335 sql::Statement s(db_->GetUniqueStatement(
1352 sql::Statement s(db_->GetUniqueStatement(
1364 sql::Statement s(db_->GetUniqueStatement(
1379 sql::Statement s(db_->GetUniqueStatement(
1397 sql::Statement s(db_->GetUniqueStatement(
1409 sql::Statement s(db_->GetUniqueStatement(
1423 if (!db_->DoesTableExist("autofill")) {
1424 if (!db_->Execute("CREATE TABLE autofill ("
1433 if (!db_->Execute("CREATE INDEX autofill_name ON autofill (name)")) {
1437 if (!db_->Execute("CREATE INDEX autofill_name_value_lower ON "
1447 if (!db_->DoesTableExist("credit_cards")) {
1448 if (!db_->Execute("CREATE TABLE credit_cards ( "
1464 if (!db_->DoesTableExist("autofill_dates")) {
1465 if (!db_->Execute("CREATE TABLE autofill_dates ( "
1471 if (!db_->Execute("CREATE INDEX autofill_dates_pair_id ON "
1481 if (!db_->DoesTableExist("autofill_profiles")) {
1482 if (!db_->Execute("CREATE TABLE autofill_profiles ( "
1501 if (!db_->DoesTableExist("autofill_profile_names")) {
1502 if (!db_->Execute("CREATE TABLE autofill_profile_names ( "
1515 if (!db_->DoesTableExist("autofill_profile_emails")) {
1516 if (!db_->Execute("CREATE TABLE autofill_profile_emails ( "
1527 if (!db_->DoesTableExist("autofill_profile_phones")) {
1528 if (!db_->Execute("CREATE TABLE autofill_profile_phones ( "
1540 if (!db_->DoesTableExist("autofill_profiles_trash")) {
1541 if (!db_->Execute("CREATE TABLE autofill_profiles_trash ( "
1580 if (!db_->DoesColumnExist("credit_cards", "card_number_encrypted")) {
1581 if (!db_->Execute("ALTER TABLE credit_cards ADD COLUMN "
1589 if (!db_->DoesColumnExist("credit_cards", "verification_code_encrypted")) {
1590 if (!db_->Execute("ALTER TABLE credit_cards ADD COLUMN "
1628 if (!db_->Execute(query.c_str()))
1633 if (!db_->Execute(query.c_str()))
1637 if (db_->DoesColumnExist("credit_cards", "label") &&
1638 db_->DoesColumnExist("credit_cards", "name_on_card") &&
1639 db_->DoesColumnExist("credit_cards", "type") &&
1640 db_->DoesColumnExist("credit_cards", "expiration_month") &&
1641 db_->DoesColumnExist("credit_cards", "expiration_year") &&
1642 db_->DoesColumnExist("credit_cards", "billing_address") &&
1643 db_->DoesColumnExist("credit_cards", "shipping_address") &&
1644 db_->DoesColumnExist("autofill_profiles", "label")) {
1649 if (!db_->Execute(query.c_str()))
1653 if (db_->DoesColumnExist("autofill_profiles", "label")) {
1657 if (!db_
1671 if (!(db_->DoesColumnExist("credit_cards", "unique_id") &&
1672 db_->DoesColumnExist("credit_cards", "billing_address") &&
1673 db_->DoesColumnExist("autofill_profiles", "unique_id"))) {
1681 sql::Statement s(db_->GetUniqueStatement(stmt.c_str()));
1693 sql::Statement s(db_->GetUniqueStatement(stmt.c_str()));
1704 if (!db_->Execute("CREATE TABLE credit_cards_temp ( "
1720 if (!db_->Execute(
1729 if (!db_->Execute("DROP TABLE credit_cards"))
1732 if (!db_->Execute("ALTER TABLE credit_cards_temp RENAME TO credit_cards"))
1737 sql::Statement s(db_->GetCachedStatement(
1755 if (!db_->DoesColumnExist("autofill_profiles", "date_modified")) {
1756 if (!db_->Execute("ALTER TABLE autofill_profiles ADD COLUMN "
1761 sql::Statement s(db_->GetUniqueStatement(
1773 if (!db_->DoesColumnExist("credit_cards", "date_modified")) {
1774 if (!db_->Execute("ALTER TABLE credit_cards ADD COLUMN "
1779 sql::Statement s(db_->GetUniqueStatement(
1797 if (!db_->DoesColumnExist("autofill_profiles", "guid")) {
1798 if (!db_->Execute("ALTER TABLE autofill_profiles ADD COLUMN "
1805 sql::Statement s(db_->GetUniqueStatement("SELECT unique_id "
1812 db_->GetUniqueStatement("UPDATE autofill_profiles "
1827 if (!db_->DoesColumnExist("credit_cards", "guid")) {
1828 if (!db_->Execute("ALTER TABLE credit_cards ADD COLUMN "
1835 sql::Statement s(db_->GetUniqueStatement("SELECT unique_id "
1842 db_->GetUniqueStatement("UPDATE credit_cards "
1858 if (db_->DoesColumnExist("autofill_profiles", "unique_id")) {
1859 if (!db_->Execute("CREATE TABLE autofill_profiles_temp ( "
1879 if (!db_->Execute(
1888 if (!db_->Execute("DROP TABLE autofill_profiles"))
1891 if (!db_->Execute(
1897 if (db_->DoesColumnExist("credit_cards", "unique_id")) {
1898 if (!db_->Execute("CREATE TABLE credit_cards_temp ( "
1909 if (!db_->Execute(
1917 if (!db_->Execute("DROP TABLE credit_cards"))
1920 if (!db_->Execute("ALTER TABLE credit_cards_temp RENAME TO credit_cards"))
1932 if (db_->DoesColumnExist("autofill_profiles", "first_name")) {
1934 if (!db_->DoesTableExist("autofill_profiles_temp")) {
1935 if (!db_->Execute("CREATE TABLE autofill_profiles_temp ( "
1949 sql::Statement s(db_->GetUniqueStatement(
1974 sql::Statement s_insert(db_->GetUniqueStatement(
1996 if (!AddAutofillProfilePieces(profile, db_))
2000 if (!db_->Execute("DROP TABLE autofill_profiles"))
2003 if (!db_->Execute(
2010 if (db_->DoesColumnExist("credit_cards", "label")) {
2011 if (!db_->Execute("CREATE TABLE credit_cards_temp ( "
2021 if (!db_->Execute(
2029 if (!db_->Execute("DROP TABLE credit_cards"))
2032 if (!db_->Execute("ALTER TABLE credit_cards_temp RENAME TO credit_cards"))
2044 if (!db_->DoesColumnExist("autofill_profiles", "country_code")) {
2045 if (!db_->Execute("ALTER TABLE autofill_profiles ADD COLUMN "
2051 sql::Statement s(db_->GetUniqueStatement("SELECT guid, country "
2059 db_->GetUniqueStatement("UPDATE autofill_profiles "
2082 sql::Statement s(db_->GetUniqueStatement(
2091 sql::Statement s(db_->GetUniqueStatement(
2153 sql::Statement s_date(db_->GetUniqueStatement(