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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <ostream> | 9 #include <ostream> |
10 #include <string> | 10 #include <string> |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void OnSyncedPrefChanged(const std::string& path, bool from_sync) override; | 165 void OnSyncedPrefChanged(const std::string& path, bool from_sync) override; |
166 | 166 |
167 // ArcAuthContextDelegate: | 167 // ArcAuthContextDelegate: |
168 void OnContextReady() override; | 168 void OnContextReady() override; |
169 void OnPrepareContextFailed() override; | 169 void OnPrepareContextFailed() override; |
170 | 170 |
171 // ArcAndroidManagementCheckerDelegate: | 171 // ArcAndroidManagementCheckerDelegate: |
172 void OnAndroidManagementChecked( | 172 void OnAndroidManagementChecked( |
173 policy::AndroidManagementClient::Result result) override; | 173 policy::AndroidManagementClient::Result result) override; |
174 | 174 |
| 175 // Stops ARC and wipes data. |
| 176 void StopArcAndWipeData(); |
| 177 |
| 178 // Restarts ARC if it is enabled. |
| 179 void RestartArc(); |
| 180 |
175 // Returns current page that has to be shown in OptIn UI. | 181 // Returns current page that has to be shown in OptIn UI. |
176 UIPage ui_page() const { return ui_page_; } | 182 UIPage ui_page() const { return ui_page_; } |
177 | 183 |
178 // Returns current page status, relevant to the specific page. | 184 // Returns current page status, relevant to the specific page. |
179 const base::string16& ui_page_status() { return ui_page_status_; } | 185 const base::string16& ui_page_status() { return ui_page_status_; } |
180 | 186 |
181 private: | 187 private: |
182 void StartArc(); | 188 void StartArc(); |
183 void ShowUI(UIPage page, const base::string16& status); | 189 void ShowUI(UIPage page, const base::string16& status); |
184 void CloseUI(); | 190 void CloseUI(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; | 227 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; |
222 | 228 |
223 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); | 229 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); |
224 }; | 230 }; |
225 | 231 |
226 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); | 232 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); |
227 | 233 |
228 } // namespace arc | 234 } // namespace arc |
229 | 235 |
230 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ | 236 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ |
OLD | NEW |