| 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 {
|
|
|