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

Unified Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc

Issue 576383002: easy-signin: Wire GetSignInChallenge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, add fake key Created 6 years, 3 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/easy_unlock_private/easy_unlock_private_api.cc
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
index 6bbdc5cc8b47901689036493f648b66f81fa1ece..c8cc9273f78a3ef461e3b429cd4561ba26679331 100644
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
@@ -541,9 +541,14 @@ EasyUnlockPrivateGetSignInChallengeFunction::
~EasyUnlockPrivateGetSignInChallengeFunction() {
}
-bool EasyUnlockPrivateGetSignInChallengeFunction::RunAsync() {
- SetError("Not implemented");
- SendResponse(false);
+bool EasyUnlockPrivateGetSignInChallengeFunction::RunSync() {
+ Profile* profile = Profile::FromBrowserContext(browser_context());
+ const std::string challenge =
+ EasyUnlockService::Get(profile)->GetChallenge();
+ if (!challenge.empty()) {
+ results_ =
+ easy_unlock_private::GetSignInChallenge::Results::Create(challenge);
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698