OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chromeos/arc/arc_support_host.h" | 5 #include "chrome/browser/chromeos/arc/arc_support_host.h" |
6 | 6 |
7 #include "ash/system/chromeos/devicetype_utils.h" | 7 #include "ash/system/chromeos/devicetype_utils.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const char kActionCancelAuthCode[] = "cancelAuthCode"; | 25 const char kActionCancelAuthCode[] = "cancelAuthCode"; |
26 const char kActionSetAuthCode[] = "setAuthCode"; | 26 const char kActionSetAuthCode[] = "setAuthCode"; |
27 const char kActionCloseUI[] = "closeUI"; | 27 const char kActionCloseUI[] = "closeUI"; |
28 const char kActionShowPage[] = "showPage"; | 28 const char kActionShowPage[] = "showPage"; |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 // static | 31 // static |
32 const char ArcSupportHost::kHostName[] = "com.google.arc_support"; | 32 const char ArcSupportHost::kHostName[] = "com.google.arc_support"; |
33 | 33 |
34 // static | 34 // static |
| 35 const char ArcSupportHost::kHostAppId[] = "cnbgggchhmkkdmeppjobngjoejnihlei"; |
| 36 |
| 37 // static |
| 38 const char ArcSupportHost::kStorageId[] = "arc_support"; |
| 39 |
| 40 // static |
35 const char* const ArcSupportHost::kHostOrigin[] = { | 41 const char* const ArcSupportHost::kHostOrigin[] = { |
36 "chrome-extension://cnbgggchhmkkdmeppjobngjoejnihlei/"}; | 42 "chrome-extension://cnbgggchhmkkdmeppjobngjoejnihlei/"}; |
37 | 43 |
38 // static | 44 // static |
39 std::unique_ptr<extensions::NativeMessageHost> ArcSupportHost::Create() { | 45 std::unique_ptr<extensions::NativeMessageHost> ArcSupportHost::Create() { |
40 return std::unique_ptr<NativeMessageHost>(new ArcSupportHost()); | 46 return std::unique_ptr<NativeMessageHost>(new ArcSupportHost()); |
41 } | 47 } |
42 | 48 |
43 ArcSupportHost::ArcSupportHost() { | 49 ArcSupportHost::ArcSupportHost() { |
44 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); | 50 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 arc_auth_service->CancelAuthCode(); | 168 arc_auth_service->CancelAuthCode(); |
163 } else { | 169 } else { |
164 NOTREACHED(); | 170 NOTREACHED(); |
165 } | 171 } |
166 } | 172 } |
167 | 173 |
168 scoped_refptr<base::SingleThreadTaskRunner> ArcSupportHost::task_runner() | 174 scoped_refptr<base::SingleThreadTaskRunner> ArcSupportHost::task_runner() |
169 const { | 175 const { |
170 return base::ThreadTaskRunnerHandle::Get(); | 176 return base::ThreadTaskRunnerHandle::Get(); |
171 } | 177 } |
OLD | NEW |