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

Unified Diff: components/autofill/core/browser/autofill_manager.h

Issue 223133003: Allow deleting autofill password suggestions on Shift+Delete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed problems in previous patch Created 6 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: components/autofill/core/browser/autofill_manager.h
diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h
index 71109638a4ce6e73c695831c4f07065f7c8a1d9e..55ed4669f6807a8d7f49399051e2cc7cb3802c2a 100644
--- a/components/autofill/core/browser/autofill_manager.h
+++ b/components/autofill/core/browser/autofill_manager.h
@@ -167,6 +167,20 @@ class AutofillManager : public AutofillDownloadManager::Observer {
// Returns the value of the AutofillEnabled pref.
virtual bool IsAutofillEnabled() const;
+ base::string16 GetUserNameToRemove();
+
+ void SetUserNameToRemove(const base::string16& username_to_remove);
+
+
+ inline base::string16 username_to_remove() {
+ return username_to_remove_;
+ }
+
+ inline void set_username_to_remove(
+ const base::string16& username_to_remove) {
+ username_to_remove_ = username_to_remove;
+ }
+
protected:
// Test code should prefer to use this constructor.
AutofillManager(AutofillDriver* driver,
@@ -342,6 +356,11 @@ class AutofillManager : public AutofillDownloadManager::Observer {
base::WeakPtrFactory<AutofillManager> weak_ptr_factory_;
+ // When the user deletes a password suggestion, the associated username is
+ // kept here, so that the password can be removed from the PasswordStore
+ // later.
+ base::string16 username_to_remove_;
+
friend class AutofillManagerTest;
friend class autofill::FormStructureBrowserTest;
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,

Powered by Google App Engine
This is Rietveld 408576698