| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_WEB_DATABASE_H__ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATABASE_H__ |
| 6 #define CHROME_BROWSER_WEBDATA_WEB_DATABASE_H__ | 6 #define CHROME_BROWSER_WEBDATA_WEB_DATABASE_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "chrome/browser/meta_table_helper.h" | 12 #include "chrome/browser/meta_table_helper.h" |
| 13 #include "chrome/browser/template_url.h" | 13 #include "chrome/browser/template_url.h" |
| 14 #include "chrome/common/sqlite_utils.h" | 14 #include "chrome/common/sqlite_utils.h" |
| 15 #include "skia/include/SkBitmap.h" | 15 #include "skia/include/SkBitmap.h" |
| 16 | 16 |
| 17 class Time; | 17 class base::Time; |
| 18 struct PasswordForm; | 18 struct PasswordForm; |
| 19 struct IE7PasswordInfo; | 19 struct IE7PasswordInfo; |
| 20 | 20 |
| 21 //////////////////////////////////////////////////////////////////////////////// | 21 //////////////////////////////////////////////////////////////////////////////// |
| 22 // | 22 // |
| 23 // A Sqlite database instance to store all the meta data we have about web pages | 23 // A Sqlite database instance to store all the meta data we have about web pages |
| 24 // | 24 // |
| 25 //////////////////////////////////////////////////////////////////////////////// | 25 //////////////////////////////////////////////////////////////////////////////// |
| 26 class WebDatabase { | 26 class WebDatabase { |
| 27 public: | 27 public: |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // Removes |form| from the list of remembered password forms. | 85 // Removes |form| from the list of remembered password forms. |
| 86 bool RemoveLogin(const PasswordForm& form); | 86 bool RemoveLogin(const PasswordForm& form); |
| 87 | 87 |
| 88 // Removes |info| from the list of imported passwords from ie7/ie8. | 88 // Removes |info| from the list of imported passwords from ie7/ie8. |
| 89 bool RemoveIE7Login(const IE7PasswordInfo& info); | 89 bool RemoveIE7Login(const IE7PasswordInfo& info); |
| 90 | 90 |
| 91 // Removes all logins created from |delete_begin| onwards (inclusive) and | 91 // Removes all logins created from |delete_begin| onwards (inclusive) and |
| 92 // before |delete_end|. You may use a null Time value to do an unbounded | 92 // before |delete_end|. You may use a null Time value to do an unbounded |
| 93 // delete in either direction. | 93 // delete in either direction. |
| 94 bool RemoveLoginsCreatedBetween(const Time delete_begin, | 94 bool RemoveLoginsCreatedBetween(const base::Time delete_begin, |
| 95 const Time delete_end); | 95 const base::Time delete_end); |
| 96 | 96 |
| 97 // Loads a list of matching password forms into the specified vector |forms|. | 97 // Loads a list of matching password forms into the specified vector |forms|. |
| 98 // The list will contain all possibly relevant entries to the observed |form|, | 98 // The list will contain all possibly relevant entries to the observed |form|, |
| 99 // including blacklisted matches. | 99 // including blacklisted matches. |
| 100 bool GetLogins(const PasswordForm& form, std::vector<PasswordForm*>* forms); | 100 bool GetLogins(const PasswordForm& form, std::vector<PasswordForm*>* forms); |
| 101 | 101 |
| 102 // Return the ie7/ie8 login matching |info|. | 102 // Return the ie7/ie8 login matching |info|. |
| 103 bool GetIE7Login(const IE7PasswordInfo& info, IE7PasswordInfo* result); | 103 bool GetIE7Login(const IE7PasswordInfo& info, IE7PasswordInfo* result); |
| 104 | 104 |
| 105 // Loads the complete list of password forms into the specified vector |forms| | 105 // Loads the complete list of password forms into the specified vector |forms| |
| (...skipping 28 matching lines...) Expand all Loading... |
| 134 void MigrateOldVersionsAsNeeded(); | 134 void MigrateOldVersionsAsNeeded(); |
| 135 | 135 |
| 136 sqlite3* db_; | 136 sqlite3* db_; |
| 137 int transaction_nesting_; | 137 int transaction_nesting_; |
| 138 MetaTableHelper meta_table_; | 138 MetaTableHelper meta_table_; |
| 139 | 139 |
| 140 DISALLOW_EVIL_CONSTRUCTORS(WebDatabase); | 140 DISALLOW_EVIL_CONSTRUCTORS(WebDatabase); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H__ | 143 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H__ |
| OLD | NEW |