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

Side by Side Diff: chrome/browser/webdata/logins_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_LOGINS_TABLE_H_ 5 #ifndef CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_
6 #define CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ 6 #define CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "chrome/browser/webdata/web_database_table.h" 11 #include "chrome/browser/webdata/web_database_table.h"
12 12
13 #if defined(OS_WIN) 13 #if defined(OS_WIN)
14 struct IE7PasswordInfo; 14 struct IE7PasswordInfo;
15 #endif 15 #endif
16 16
17 class WebDatabase;
18
17 // This class manages the logins table within the SQLite database passed to the 19 // This class manages the logins table within the SQLite database passed to the
18 // constructor. We no longer store passwords here except for imported IE 20 // constructor. We no longer store passwords here except for imported IE
19 // passwords, so this class is now mostly responsible for deleting the table if 21 // passwords, so this class is now mostly responsible for deleting the table if
20 // it is found to exist. (The data was migrated out long ago.) 22 // it is found to exist. (The data was migrated out long ago.)
21 class LoginsTable : public WebDatabaseTable { 23 class LoginsTable : public WebDatabaseTable {
22 public: 24 public:
23 LoginsTable(sql::Connection* db, sql::MetaTable* meta_table) 25 LoginsTable() {}
24 : WebDatabaseTable(db, meta_table) {}
25 virtual ~LoginsTable() {} 26 virtual ~LoginsTable() {}
26 virtual bool Init() OVERRIDE; 27
28 // Retrieves the LoginsTable* owned by |database|.
29 static LoginsTable* FromWebDatabase(WebDatabase* db);
30
31 virtual WebDatabaseTable::TypeKey GetTypeKey() const OVERRIDE;
32 virtual bool Init(sql::Connection* db, sql::MetaTable* meta_table) OVERRIDE;
27 virtual bool IsSyncable() OVERRIDE; 33 virtual bool IsSyncable() OVERRIDE;
28 virtual bool MigrateToVersion(int version, 34 virtual bool MigrateToVersion(int version,
29 const std::string& app_locale, 35 const std::string& app_locale,
30 bool* update_compatible_version) OVERRIDE; 36 bool* update_compatible_version) OVERRIDE;
31 37
32 #if defined(OS_WIN) 38 #if defined(OS_WIN)
33 // Adds |info| to the list of imported passwords from ie7/ie8. 39 // Adds |info| to the list of imported passwords from ie7/ie8.
34 bool AddIE7Login(const IE7PasswordInfo& info); 40 bool AddIE7Login(const IE7PasswordInfo& info);
35 41
36 // Removes |info| from the list of imported passwords from ie7/ie8. 42 // Removes |info| from the list of imported passwords from ie7/ie8.
37 bool RemoveIE7Login(const IE7PasswordInfo& info); 43 bool RemoveIE7Login(const IE7PasswordInfo& info);
38 44
39 // Return the ie7/ie8 login matching |info|. 45 // Return the ie7/ie8 login matching |info|.
40 bool GetIE7Login(const IE7PasswordInfo& info, IE7PasswordInfo* result); 46 bool GetIE7Login(const IE7PasswordInfo& info, IE7PasswordInfo* result);
41 #endif 47 #endif
42 48
43 private: 49 private:
44 DISALLOW_COPY_AND_ASSIGN(LoginsTable); 50 DISALLOW_COPY_AND_ASSIGN(LoginsTable);
45 }; 51 };
46 52
47 #endif // CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_ 53 #endif // CHROME_BROWSER_WEBDATA_LOGINS_TABLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/webdata/keyword_table_unittest.cc ('k') | chrome/browser/webdata/logins_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698