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

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

Issue 12543034: Move creation of the various WebDatabaseTable types out of WebDatabase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows release builds (COMDAT folding combined static functions being used for keys. 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 #ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ 5 #ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_TABLE_H_
6 #define CHROME_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ 6 #define CHROME_BROWSER_WEBDATA_AUTOFILL_TABLE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "chrome/browser/webdata/web_database_table.h" 11 #include "chrome/browser/webdata/web_database_table.h"
12 12
13 #include <vector> 13 #include <vector>
14 14
15 class AutofillChange; 15 class AutofillChange;
16 class AutofillEntry; 16 class AutofillEntry;
17 class AutofillProfile; 17 class AutofillProfile;
18 class AutofillTableTest; 18 class AutofillTableTest;
19 class CreditCard; 19 class CreditCard;
20 class WebDatabase;
20 21
21 struct FormFieldData; 22 struct FormFieldData;
22 23
23 namespace base { 24 namespace base {
24 class Time; 25 class Time;
25 } 26 }
26 27
27 // This class manages the various Autofill tables within the SQLite database 28 // This class manages the various Autofill tables within the SQLite database
28 // passed to the constructor. It expects the following schemas: 29 // passed to the constructor. It expects the following schemas:
29 // 30 //
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Added in version 31. 108 // Added in version 31.
108 // name_on_card 109 // name_on_card
109 // expiration_month 110 // expiration_month
110 // expiration_year 111 // expiration_year
111 // card_number_encrypted Stores encrypted credit card number. 112 // card_number_encrypted Stores encrypted credit card number.
112 // date_modified The date on which this entry was last modified. 113 // date_modified The date on which this entry was last modified.
113 // Added in version 30. 114 // Added in version 30.
114 // 115 //
115 class AutofillTable : public WebDatabaseTable { 116 class AutofillTable : public WebDatabaseTable {
116 public: 117 public:
117 AutofillTable(sql::Connection* db, sql::MetaTable* meta_table); 118 AutofillTable();
118 virtual ~AutofillTable(); 119 virtual ~AutofillTable();
119 virtual bool Init() OVERRIDE; 120
121 // Retrieves the AutofillTable* owned by |database|.
122 static AutofillTable* FromWebDatabase(WebDatabase* db);
123
124 virtual WebDatabaseTable::TypeKey GetTypeKey() const OVERRIDE;
125 virtual bool Init(sql::Connection* db, sql::MetaTable* meta_table) OVERRIDE;
120 virtual bool IsSyncable() OVERRIDE; 126 virtual bool IsSyncable() OVERRIDE;
121 virtual bool MigrateToVersion(int version, 127 virtual bool MigrateToVersion(int version,
122 const std::string& app_locale, 128 const std::string& app_locale,
123 bool* update_compatible_version) OVERRIDE; 129 bool* update_compatible_version) OVERRIDE;
124 130
125 // Records the form elements in |elements| in the database in the 131 // Records the form elements in |elements| in the database in the
126 // autofill table. A list of all added and updated autofill entries 132 // autofill table. A list of all added and updated autofill entries
127 // is returned in the changes out parameter. 133 // is returned in the changes out parameter.
128 bool AddFormFieldValues(const std::vector<FormFieldData>& elements, 134 bool AddFormFieldValues(const std::vector<FormFieldData>& elements,
129 std::vector<AutofillChange>* changes); 135 std::vector<AutofillChange>* changes);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 bool InitProfilesTable(); 353 bool InitProfilesTable();
348 bool InitProfileNamesTable(); 354 bool InitProfileNamesTable();
349 bool InitProfileEmailsTable(); 355 bool InitProfileEmailsTable();
350 bool InitProfilePhonesTable(); 356 bool InitProfilePhonesTable();
351 bool InitProfileTrashTable(); 357 bool InitProfileTrashTable();
352 358
353 DISALLOW_COPY_AND_ASSIGN(AutofillTable); 359 DISALLOW_COPY_AND_ASSIGN(AutofillTable);
354 }; 360 };
355 361
356 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ 362 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_TABLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/webdata/autofill_profile_syncable_service.cc ('k') | chrome/browser/webdata/autofill_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698