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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h" 5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 } 534 }
535 535
536 EasyUnlockPrivateGetSignInChallengeFunction:: 536 EasyUnlockPrivateGetSignInChallengeFunction::
537 EasyUnlockPrivateGetSignInChallengeFunction() { 537 EasyUnlockPrivateGetSignInChallengeFunction() {
538 } 538 }
539 539
540 EasyUnlockPrivateGetSignInChallengeFunction:: 540 EasyUnlockPrivateGetSignInChallengeFunction::
541 ~EasyUnlockPrivateGetSignInChallengeFunction() { 541 ~EasyUnlockPrivateGetSignInChallengeFunction() {
542 } 542 }
543 543
544 bool EasyUnlockPrivateGetSignInChallengeFunction::RunAsync() { 544 bool EasyUnlockPrivateGetSignInChallengeFunction::RunSync() {
545 SetError("Not implemented"); 545 Profile* profile = Profile::FromBrowserContext(browser_context());
546 SendResponse(false); 546 const std::string challenge =
547 EasyUnlockService::Get(profile)->GetChallenge();
548 if (!challenge.empty()) {
549 results_ =
550 easy_unlock_private::GetSignInChallenge::Results::Create(challenge);
551 }
547 return true; 552 return true;
548 } 553 }
549 554
550 EasyUnlockPrivateTrySignInSecretFunction:: 555 EasyUnlockPrivateTrySignInSecretFunction::
551 EasyUnlockPrivateTrySignInSecretFunction() { 556 EasyUnlockPrivateTrySignInSecretFunction() {
552 } 557 }
553 558
554 EasyUnlockPrivateTrySignInSecretFunction:: 559 EasyUnlockPrivateTrySignInSecretFunction::
555 ~EasyUnlockPrivateTrySignInSecretFunction() { 560 ~EasyUnlockPrivateTrySignInSecretFunction() {
556 } 561 }
557 562
558 bool EasyUnlockPrivateTrySignInSecretFunction::RunAsync() { 563 bool EasyUnlockPrivateTrySignInSecretFunction::RunAsync() {
559 SetError("Not implemented"); 564 SetError("Not implemented");
560 SendResponse(false); 565 SendResponse(false);
561 return true; 566 return true;
562 } 567 }
563 568
564 } // namespace api 569 } // namespace api
565 } // namespace extensions 570 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698