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

Unified Diff: chrome/browser/password_manager/password_store.h

Issue 10209036: Per bug 121738, ignore old saved logins for http*://www.google.com. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/password_store.h
===================================================================
--- chrome/browser/password_manager/password_store.h (revision 134335)
+++ chrome/browser/password_manager/password_store.h (working copy)
@@ -52,21 +52,26 @@
// PasswordForm vector elements are meant to be owned by the
// PasswordStoreConsumer. However, if the request is canceled after the
// allocation, then the request must take care of the deletion.
- // TODO(scr) If we can convert vector<PasswordForm*> to
- // ScopedVector<PasswordForm>, then we can move the following class to merely
- // a typedef. At the moment, a subclass of CancelableRequest1 is required to
- // provide a destructor, which cleans up after canceled requests by deleting
- // vector elements.
class GetLoginsRequest
: public CancelableRequest1<GetLoginsCallback,
std::vector<webkit::forms::PasswordForm*> > {
public:
explicit GetLoginsRequest(const GetLoginsCallback& callback);
+ void set_ignore_logins_cutoff(time_t cutoff) {
+ ignore_logins_cutoff_ = cutoff;
+ }
+
+ // Removes any logins in the result list that were saved before the cutoff.
+ void ApplyIgnoreLoginsCutoff();
+
protected:
virtual ~GetLoginsRequest();
private:
+ // See GetLogins(). Logins older than this will be removed from the reply.
+ time_t ignore_logins_cutoff_;
+
DISALLOW_COPY_AND_ASSIGN(GetLoginsRequest);
};
@@ -182,18 +187,20 @@
// thread.
virtual void ForwardLoginsResult(GetLoginsRequest* request);
+ private:
// Schedule the given |func| to be run in the PasswordStore's own thread with
// responses delivered to |consumer| on the current thread.
template<typename BackendFunc>
Handle Schedule(BackendFunc func, PasswordStoreConsumer* consumer);
// Schedule the given |func| to be run in the PasswordStore's own thread with
- // argument |a| and responses delivered to |consumer| on the current thread.
- template<typename BackendFunc, typename ArgA>
+ // form |form| and responses delivered to |consumer| on the current thread.
+ // See GetLogins() for more information on |ignore_logins_cutoff|.
+ template<typename BackendFunc>
Handle Schedule(BackendFunc func, PasswordStoreConsumer* consumer,
- const ArgA& a);
+ const webkit::forms::PasswordForm& form,
+ time_t ignore_logins_cutoff);
- private:
// Wrapper method called on the destination thread (DB for non-mac) that
// invokes |task| and then calls back into the source thread to notify
// observers that the password store may have been modified via
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store.cc » ('j') | chrome/browser/password_manager/password_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698