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

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

Issue 906973007: PasswordStore: Clean up expectations about rewriting vectors of forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/native_backend_libsecret.h
diff --git a/chrome/browser/password_manager/native_backend_libsecret.h b/chrome/browser/password_manager/native_backend_libsecret.h
index 15dfc3997b7d6ea99d07f35c64b69a0029213080..b3cd459f78f51fe47e85c21052752fe8fde5cd35 100644
--- a/chrome/browser/password_manager/native_backend_libsecret.h
+++ b/chrome/browser/password_manager/native_backend_libsecret.h
@@ -86,10 +86,10 @@ class NativeBackendLibsecret : public PasswordStoreX::NativeBackend,
SEARCH_IGNORE_SUBMIT,
};
- // Search that is used in AddLogin and UpdateLogin methods
- void AddUpdateLoginSearch(const autofill::PasswordForm& lookup_form,
- AddUpdateLoginSearchOptions options,
- ScopedVector<autofill::PasswordForm>* forms);
+ // Returns credentials matching |lookup_form| and |options|.
+ ScopedVector<autofill::PasswordForm> AddUpdateLoginSearch(
+ const autofill::PasswordForm& lookup_form,
+ AddUpdateLoginSearchOptions options);
// Adds a login form without checking for one to replace first.
bool RawAddLogin(const autofill::PasswordForm& form);
@@ -100,14 +100,13 @@ class NativeBackendLibsecret : public PasswordStoreX::NativeBackend,
BLACKLISTED_LOGINS,
};
- // Reads PasswordForms from the keyring with the given autofillability state.
+ // Overwrites |forms| with credentials matching |options| from the keyring. If
+ // |lookup_form| is not NULL, only retrieves credentials PSL-matching it. In
+ // case of failures returns false and erases |forms|.
bool GetLoginsList(const autofill::PasswordForm* lookup_form,
GetLoginsListOptions options,
ScopedVector<autofill::PasswordForm>* forms);
- // Helper for GetLoginsCreatedBetween().
- bool GetAllLogins(ScopedVector<autofill::PasswordForm>* forms);
-
// Retrieves password created/synced in the time interval. Returns |true| if
// the operation succeeded.
bool GetLoginsBetween(base::Time get_begin,
@@ -123,9 +122,9 @@ class NativeBackendLibsecret : public PasswordStoreX::NativeBackend,
password_manager::PasswordStoreChangeList* changes);
// convert data get from Libsecret to Passwordform
- bool ConvertFormList(GList* found,
- const autofill::PasswordForm* lookup_form,
- ScopedVector<autofill::PasswordForm>* forms);
+ ScopedVector<autofill::PasswordForm> ConvertFormList(
+ GList* found,
+ const autofill::PasswordForm* lookup_form);
// Generates a profile-specific app string based on profile_id_.
static std::string GetProfileSpecificAppString(LocalProfileId id);

Powered by Google App Engine
This is Rietveld 408576698