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

Unified Diff: chrome/browser/extensions/api/passwords_private/passwords_private_api.cc

Issue 1892613006: Add functions to the passwords private api that update the lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/extensions/api/passwords_private/passwords_private_api.cc
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_api.cc b/chrome/browser/extensions/api/passwords_private/passwords_private_api.cc
index a74dc022928a4f70b467175aa50101e46fdd0bd9..b3b82e25c7eabd141cbfe81ed8ea5ba76296ce8c 100644
--- a/chrome/browser/extensions/api/passwords_private/passwords_private_api.cc
+++ b/chrome/browser/extensions/api/passwords_private/passwords_private_api.cc
@@ -85,4 +85,38 @@ ExtensionFunction::ResponseAction
return RespondNow(NoArguments());
}
+////////////////////////////////////////////////////////////////////////////////
+// PasswordsPrivateRequestSavedPasswordListFunction
+
+PasswordsPrivateRequestSavedPasswordListFunction::
+ ~PasswordsPrivateRequestSavedPasswordListFunction() {}
+
+ExtensionFunction::ResponseAction
+ PasswordsPrivateRequestSavedPasswordListFunction::Run() {
+ PasswordsPrivateDelegate* delegate =
+ PasswordsPrivateDelegateFactory::GetForBrowserContext(browser_context(),
+ true /* create */);
+ delegate->SendSavedPasswordsList();
+ // No response given from this API function; instead, listeners wait for the
+ // chrome.passwordsPrivate.onPlaintextPasswordRetrieved event to fire.
+ return RespondNow(NoArguments());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// PasswordsPrivateRequestPasswordExceptionListFunction
+
+PasswordsPrivateRequestPasswordExceptionListFunction::
+ ~PasswordsPrivateRequestPasswordExceptionListFunction() {}
+
+ExtensionFunction::ResponseAction
+ PasswordsPrivateRequestPasswordExceptionListFunction::Run() {
+ PasswordsPrivateDelegate* delegate =
+ PasswordsPrivateDelegateFactory::GetForBrowserContext(browser_context(),
+ true /* create */);
+ delegate->SendPasswordExceptionsList();
+ // No response given from this API function; instead, listeners wait for the
+ // chrome.passwordsPrivate.onPlaintextPasswordRetrieved event to fire.
+ return RespondNow(NoArguments());
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698