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

Side by Side Diff: chrome/browser/password_manager/password_store_x.h

Issue 335893002: Support to remove passwords by date_synced timestamp. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vabr's comments Created 6 years, 6 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_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 28 matching lines...) Expand all
39 virtual ~NativeBackend() {} 39 virtual ~NativeBackend() {}
40 40
41 virtual bool Init() = 0; 41 virtual bool Init() = 0;
42 42
43 virtual password_manager::PasswordStoreChangeList AddLogin( 43 virtual password_manager::PasswordStoreChangeList AddLogin(
44 const autofill::PasswordForm& form) = 0; 44 const autofill::PasswordForm& form) = 0;
45 virtual bool UpdateLogin( 45 virtual bool UpdateLogin(
46 const autofill::PasswordForm& form, 46 const autofill::PasswordForm& form,
47 password_manager::PasswordStoreChangeList* changes) = 0; 47 password_manager::PasswordStoreChangeList* changes) = 0;
48 virtual bool RemoveLogin(const autofill::PasswordForm& form) = 0; 48 virtual bool RemoveLogin(const autofill::PasswordForm& form) = 0;
49 virtual bool RemoveLoginsCreatedBetween(const base::Time& delete_begin, 49
50 const base::Time& delete_end) = 0; 50 // Removes all logins created/synced from |delete_begin| onwards (inclusive)
51 // and before |delete_end|. You may use a null Time value to do an unbounded
52 // delete in either direction.
53 virtual bool RemoveLoginsCreatedBetween(base::Time delete_begin,
54 base::Time delete_end) = 0;
55 virtual bool RemoveLoginsSyncedBetween(
56 base::Time delete_begin,
57 base::Time delete_end,
58 password_manager::PasswordStoreChangeList* changes) = 0;
59
51 virtual bool GetLogins(const autofill::PasswordForm& form, 60 virtual bool GetLogins(const autofill::PasswordForm& form,
52 PasswordFormList* forms) = 0; 61 PasswordFormList* forms) = 0;
53 virtual bool GetLoginsCreatedBetween(const base::Time& get_begin, 62 virtual bool GetLoginsCreatedBetween(base::Time get_begin,
54 const base::Time& get_end, 63 base::Time get_end,
55 PasswordFormList* forms) = 0; 64 PasswordFormList* forms) = 0;
56 virtual bool GetAutofillableLogins(PasswordFormList* forms) = 0; 65 virtual bool GetAutofillableLogins(PasswordFormList* forms) = 0;
57 virtual bool GetBlacklistLogins(PasswordFormList* forms) = 0; 66 virtual bool GetBlacklistLogins(PasswordFormList* forms) = 0;
58 }; 67 };
59 68
60 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which 69 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which
61 // case this PasswordStoreX will act the same as PasswordStoreDefault. 70 // case this PasswordStoreX will act the same as PasswordStoreDefault.
62 PasswordStoreX(scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, 71 PasswordStoreX(scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
63 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, 72 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner,
64 password_manager::LoginDatabase* login_db, 73 password_manager::LoginDatabase* login_db,
65 NativeBackend* backend); 74 NativeBackend* backend);
66 75
67 private: 76 private:
68 friend class PasswordStoreXTest; 77 friend class PasswordStoreXTest;
69 78
70 virtual ~PasswordStoreX(); 79 virtual ~PasswordStoreX();
71 80
72 // Implements PasswordStore interface. 81 // Implements PasswordStore interface.
73 virtual password_manager::PasswordStoreChangeList AddLoginImpl( 82 virtual password_manager::PasswordStoreChangeList AddLoginImpl(
74 const autofill::PasswordForm& form) OVERRIDE; 83 const autofill::PasswordForm& form) OVERRIDE;
75 virtual password_manager::PasswordStoreChangeList UpdateLoginImpl( 84 virtual password_manager::PasswordStoreChangeList UpdateLoginImpl(
76 const autofill::PasswordForm& form) OVERRIDE; 85 const autofill::PasswordForm& form) OVERRIDE;
77 virtual password_manager::PasswordStoreChangeList RemoveLoginImpl( 86 virtual password_manager::PasswordStoreChangeList RemoveLoginImpl(
78 const autofill::PasswordForm& form) OVERRIDE; 87 const autofill::PasswordForm& form) OVERRIDE;
79 virtual password_manager::PasswordStoreChangeList 88 virtual password_manager::PasswordStoreChangeList
80 RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin, 89 RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin,
81 const base::Time& delete_end) OVERRIDE; 90 const base::Time& delete_end) OVERRIDE;
91 virtual password_manager::PasswordStoreChangeList
92 RemoveLoginsSyncedBetweenImpl(base::Time delete_begin,
93 base::Time delete_end) OVERRIDE;
82 virtual void GetLoginsImpl( 94 virtual void GetLoginsImpl(
83 const autofill::PasswordForm& form, 95 const autofill::PasswordForm& form,
84 AuthorizationPromptPolicy prompt_policy, 96 AuthorizationPromptPolicy prompt_policy,
85 const ConsumerCallbackRunner& callback_runner) OVERRIDE; 97 const ConsumerCallbackRunner& callback_runner) OVERRIDE;
86 virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE; 98 virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE;
87 virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE; 99 virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE;
88 virtual bool FillAutofillableLogins( 100 virtual bool FillAutofillableLogins(
89 std::vector<autofill::PasswordForm*>* forms) OVERRIDE; 101 std::vector<autofill::PasswordForm*>* forms) OVERRIDE;
90 virtual bool FillBlacklistLogins( 102 virtual bool FillBlacklistLogins(
91 std::vector<autofill::PasswordForm*>* forms) OVERRIDE; 103 std::vector<autofill::PasswordForm*>* forms) OVERRIDE;
(...skipping 24 matching lines...) Expand all
116 // Whether we should allow falling back to the default store. If there is 128 // Whether we should allow falling back to the default store. If there is
117 // nothing to migrate, then the first attempt to use the native store will 129 // nothing to migrate, then the first attempt to use the native store will
118 // be the first time we try to use it and we should allow falling back. If 130 // be the first time we try to use it and we should allow falling back. If
119 // we have migrated successfully, then we do not allow falling back. 131 // we have migrated successfully, then we do not allow falling back.
120 bool allow_fallback_; 132 bool allow_fallback_;
121 133
122 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); 134 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX);
123 }; 135 };
124 136
125 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ 137 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698