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

Unified Diff: chrome/browser/webdata/web_database.cc

Issue 5515006: Revert 68358 - Don't re-save autofill profiles to the web database if they ha... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
« no previous file with comments | « chrome/browser/webdata/web_database.h ('k') | chrome/browser/webdata/web_database_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/web_database.cc
===================================================================
--- chrome/browser/webdata/web_database.cc (revision 68359)
+++ chrome/browser/webdata/web_database.cc (working copy)
@@ -1693,14 +1693,6 @@
bool WebDatabase::UpdateAutoFillProfile(const AutoFillProfile& profile) {
DCHECK(guid::IsValidGUID(profile.guid()));
-
- // Preserve appropriate modification dates by not updating unchanged profiles.
- AutoFillProfile* tmp_profile = NULL;
- DCHECK(GetAutoFillProfileForGUID(profile.guid(), &tmp_profile));
- scoped_ptr<AutoFillProfile> old_profile(tmp_profile);
- if (*old_profile == profile)
- return true;
-
sql::Statement s(db_.GetUniqueStatement(
"UPDATE autofill_profiles "
"SET guid=?, label=?, first_name=?, middle_name=?, last_name=?, "
@@ -1821,14 +1813,6 @@
bool WebDatabase::UpdateCreditCard(const CreditCard& credit_card) {
DCHECK(guid::IsValidGUID(credit_card.guid()));
-
- // Preserve appropriate modification dates by not updating unchanged cards.
- CreditCard* tmp_credit_card = NULL;
- DCHECK(GetCreditCardForGUID(credit_card.guid(), &tmp_credit_card));
- scoped_ptr<CreditCard> old_credit_card(tmp_credit_card);
- if (*old_credit_card == credit_card)
- return true;
-
sql::Statement s(db_.GetUniqueStatement(
"UPDATE credit_cards "
"SET guid=?, label=?, name_on_card=?, expiration_month=?, "
« no previous file with comments | « chrome/browser/webdata/web_database.h ('k') | chrome/browser/webdata/web_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698