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

Side by Side Diff: chrome/browser/webdata/autofill_table.cc

Issue 12987023: Rip autofill code out of webdataservice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change method name in AutofillTable 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/webdata/autofill_table.h" 5 #include "chrome/browser/webdata/autofill_table.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 1190
1191 bool AutofillTable::RemoveCreditCard(const std::string& guid) { 1191 bool AutofillTable::RemoveCreditCard(const std::string& guid) {
1192 DCHECK(base::IsValidGUID(guid)); 1192 DCHECK(base::IsValidGUID(guid));
1193 sql::Statement s(db_->GetUniqueStatement( 1193 sql::Statement s(db_->GetUniqueStatement(
1194 "DELETE FROM credit_cards WHERE guid = ?")); 1194 "DELETE FROM credit_cards WHERE guid = ?"));
1195 s.BindString(0, guid); 1195 s.BindString(0, guid);
1196 1196
1197 return s.Run(); 1197 return s.Run();
1198 } 1198 }
1199 1199
1200 bool AutofillTable::RemoveAutofillProfilesAndCreditCardsModifiedBetween( 1200 bool AutofillTable::RemoveAutofillDataModifiedBetween(
1201 const Time& delete_begin, 1201 const Time& delete_begin,
1202 const Time& delete_end, 1202 const Time& delete_end,
1203 std::vector<std::string>* profile_guids, 1203 std::vector<std::string>* profile_guids,
1204 std::vector<std::string>* credit_card_guids) { 1204 std::vector<std::string>* credit_card_guids) {
1205 DCHECK(delete_end.is_null() || delete_begin < delete_end); 1205 DCHECK(delete_end.is_null() || delete_begin < delete_end);
1206 1206
1207 time_t delete_begin_t = delete_begin.ToTimeT(); 1207 time_t delete_begin_t = delete_begin.ToTimeT();
1208 time_t delete_end_t = 1208 time_t delete_end_t =
1209 (delete_end.is_null() || delete_end == base::Time::Max()) ? 1209 (delete_end.is_null() || delete_end == base::Time::Max()) ?
1210 std::numeric_limits<time_t>::max() : delete_end.ToTimeT(); 1210 std::numeric_limits<time_t>::max() : delete_end.ToTimeT();
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
2039 "WHERE guid=?")); 2039 "WHERE guid=?"));
2040 s_date.BindInt64(0, date_item->second); 2040 s_date.BindInt64(0, date_item->second);
2041 s_date.BindString(1, iter->guid()); 2041 s_date.BindString(1, iter->guid());
2042 2042
2043 if (!s_date.Run()) 2043 if (!s_date.Run())
2044 return false; 2044 return false;
2045 } 2045 }
2046 2046
2047 return true; 2047 return true;
2048 } 2048 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/autofill_table.h ('k') | chrome/browser/webdata/autofill_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698