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

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

Issue 14419: Porting in browser/webdata and template_url. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/webdata/web_data_service.h ('k') | chrome/browser/webdata/web_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "webkit/glue/autofill_form.h" 16 #include "webkit/glue/autofill_form.h"
17 17
18 namespace base { 18 namespace base {
19 class Time; 19 class Time;
20 } 20 }
21 struct PasswordForm; 21 struct PasswordForm;
22 #if defined(OS_WIN)
22 struct IE7PasswordInfo; 23 struct IE7PasswordInfo;
24 #endif
23 25
24 //////////////////////////////////////////////////////////////////////////////// 26 ////////////////////////////////////////////////////////////////////////////////
25 // 27 //
26 // A Sqlite database instance to store all the meta data we have about web pages 28 // A Sqlite database instance to store all the meta data we have about web pages
27 // 29 //
28 //////////////////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////////////////
29 class WebDatabase { 31 class WebDatabase {
30 public: 32 public:
31 WebDatabase(); 33 WebDatabase();
32 ~WebDatabase(); 34 ~WebDatabase();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 74
73 ////////////////////////////////////////////////////////////////////////////// 75 //////////////////////////////////////////////////////////////////////////////
74 // 76 //
75 // Password manager support 77 // Password manager support
76 // 78 //
77 ////////////////////////////////////////////////////////////////////////////// 79 //////////////////////////////////////////////////////////////////////////////
78 80
79 // Adds |form| to the list of remembered password forms. 81 // Adds |form| to the list of remembered password forms.
80 bool AddLogin(const PasswordForm& form); 82 bool AddLogin(const PasswordForm& form);
81 83
84 #if defined(OS_WIN)
82 // Adds |info| to the list of imported passwords from ie7/ie8. 85 // Adds |info| to the list of imported passwords from ie7/ie8.
83 bool AddIE7Login(const IE7PasswordInfo& info); 86 bool AddIE7Login(const IE7PasswordInfo& info);
84 87
88 // Removes |info| from the list of imported passwords from ie7/ie8.
89 bool RemoveIE7Login(const IE7PasswordInfo& info);
90
91 // Return the ie7/ie8 login matching |info|.
92 bool GetIE7Login(const IE7PasswordInfo& info, IE7PasswordInfo* result);
93 #endif
94
85 // Updates remembered password form. 95 // Updates remembered password form.
86 bool UpdateLogin(const PasswordForm& form); 96 bool UpdateLogin(const PasswordForm& form);
87 97
88 // Removes |form| from the list of remembered password forms. 98 // Removes |form| from the list of remembered password forms.
89 bool RemoveLogin(const PasswordForm& form); 99 bool RemoveLogin(const PasswordForm& form);
90 100
91 // Removes |info| from the list of imported passwords from ie7/ie8.
92 bool RemoveIE7Login(const IE7PasswordInfo& info);
93
94 // Removes all logins created from |delete_begin| onwards (inclusive) and 101 // Removes all logins created from |delete_begin| onwards (inclusive) and
95 // before |delete_end|. You may use a null Time value to do an unbounded 102 // before |delete_end|. You may use a null Time value to do an unbounded
96 // delete in either direction. 103 // delete in either direction.
97 bool RemoveLoginsCreatedBetween(const base::Time delete_begin, 104 bool RemoveLoginsCreatedBetween(const base::Time delete_begin,
98 const base::Time delete_end); 105 const base::Time delete_end);
99 106
100 // Loads a list of matching password forms into the specified vector |forms|. 107 // Loads a list of matching password forms into the specified vector |forms|.
101 // The list will contain all possibly relevant entries to the observed |form|, 108 // The list will contain all possibly relevant entries to the observed |form|,
102 // including blacklisted matches. 109 // including blacklisted matches.
103 bool GetLogins(const PasswordForm& form, std::vector<PasswordForm*>* forms); 110 bool GetLogins(const PasswordForm& form, std::vector<PasswordForm*>* forms);
104 111
105 // Return the ie7/ie8 login matching |info|.
106 bool GetIE7Login(const IE7PasswordInfo& info, IE7PasswordInfo* result);
107
108 // Loads the complete list of password forms into the specified vector |forms| 112 // Loads the complete list of password forms into the specified vector |forms|
109 // if include_blacklisted is true, otherwise only loads those which are 113 // if include_blacklisted is true, otherwise only loads those which are
110 // actually autofillable; i.e haven't been blacklisted by the user selecting 114 // actually autofillable; i.e haven't been blacklisted by the user selecting
111 // the 'Never for this site' button. 115 // the 'Never for this site' button.
112 bool GetAllLogins(std::vector<PasswordForm*>* forms, 116 bool GetAllLogins(std::vector<PasswordForm*>* forms,
113 bool include_blacklisted); 117 bool include_blacklisted);
114 118
115 ////////////////////////////////////////////////////////////////////////////// 119 //////////////////////////////////////////////////////////////////////////////
116 // 120 //
117 // Autofill 121 // Autofill
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 bool InitAutofillDatesTable(); 202 bool InitAutofillDatesTable();
199 bool InitWebAppIconsTable(); 203 bool InitWebAppIconsTable();
200 bool InitWebAppsTable(); 204 bool InitWebAppsTable();
201 205
202 void MigrateOldVersionsAsNeeded(); 206 void MigrateOldVersionsAsNeeded();
203 207
204 sqlite3* db_; 208 sqlite3* db_;
205 int transaction_nesting_; 209 int transaction_nesting_;
206 MetaTableHelper meta_table_; 210 MetaTableHelper meta_table_;
207 211
208 DISALLOW_EVIL_CONSTRUCTORS(WebDatabase); 212 DISALLOW_COPY_AND_ASSIGN(WebDatabase);
209 }; 213 };
210 214
211 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H__ 215 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H__
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service.h ('k') | chrome/browser/webdata/web_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698