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

Unified Diff: chrome/browser/extensions/api/messaging/arc_support_host.cc

Issue 1847463002: arc: Use v2/auth LSO page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove arc_auth_fetcher Created 4 years, 9 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/messaging/arc_support_host.cc
diff --git a/chrome/browser/extensions/api/messaging/arc_support_host.cc b/chrome/browser/extensions/api/messaging/arc_support_host.cc
index e78cedeba322c0db51ca2dcff8b22990a0341e4e..236f5f5b16ee524f4b953a77058a284781757bbb 100644
--- a/chrome/browser/extensions/api/messaging/arc_support_host.cc
+++ b/chrome/browser/extensions/api/messaging/arc_support_host.cc
@@ -16,12 +16,14 @@
namespace {
const char kAction[] = "action";
+const char kCode[] = "code";
const char kStatus[] = "status";
const char kData[] = "data";
const char kPage[] = "page";
const char kActionSetLocalization[] = "setLocalization";
-const char kActionCheckAuthCode[] = "checkAuthCode";
+const char kActionStartLSO[] = "startLSO";
const char kActionCancelAuthCode[] = "cancelAuthCode";
+const char kActionSetAuthCode[] = "setAuthCode";
const char kActionCloseUI[] = "closeUI";
const char kActionShowPage[] = "showPage";
} // namespace
@@ -138,8 +140,15 @@ void ArcSupportHost::OnMessage(const std::string& request_string) {
return;
}
- if (action == kActionCheckAuthCode) {
- arc::ArcAuthService::Get()->CheckAuthCode();
+ if (action == kActionStartLSO) {
+ arc::ArcAuthService::Get()->StartLSO();
+ } else if (action == kActionSetAuthCode) {
+ std::string code;
+ if (!request->GetString(kCode, &code)) {
+ NOTREACHED();
+ return;
+ }
+ arc::ArcAuthService::Get()->SetAuthCodeAndStartArc(code);
} else if (action == kActionCancelAuthCode) {
arc::ArcAuthService::Get()->CancelAuthCode();
} else {

Powered by Google App Engine
This is Rietveld 408576698