| 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_ENTERPRISE_REPORTING_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
| 13 #include "components/arc/arc_bridge_service.h" | 13 #include "components/arc/arc_bridge_service.h" |
| 14 #include "components/arc/arc_service.h" | 14 #include "components/arc/arc_service.h" |
| 15 #include "components/arc/instance_holder.h" | 15 #include "components/arc/instance_holder.h" |
| 16 #include "mojo/public/cpp/bindings/binding.h" | 16 #include "mojo/public/cpp/bindings/binding.h" |
| 17 | 17 |
| 18 namespace mojo { |
| 19 class String; |
| 20 } |
| 21 |
| 18 namespace arc { | 22 namespace arc { |
| 19 | 23 |
| 20 // This class controls the ARC enterprise reporting. | 24 // This class controls the ARC enterprise reporting. |
| 21 class ArcEnterpriseReportingService | 25 class ArcEnterpriseReportingService |
| 22 : public ArcService, | 26 : public ArcService, |
| 23 public InstanceHolder<mojom::EnterpriseReportingInstance>::Observer, | 27 public InstanceHolder<mojom::EnterpriseReportingInstance>::Observer, |
| 24 public mojom::EnterpriseReportingHost { | 28 public mojom::EnterpriseReportingHost { |
| 25 public: | 29 public: |
| 26 explicit ArcEnterpriseReportingService(ArcBridgeService* arc_bridge_service); | 30 explicit ArcEnterpriseReportingService(ArcBridgeService* arc_bridge_service); |
| 27 ~ArcEnterpriseReportingService() override; | 31 ~ArcEnterpriseReportingService() override; |
| 28 | 32 |
| 29 // InstanceHolder<mojom::EnterpriseReportingInstance>::Observer overrides: | 33 // InstanceHolder<mojom::EnterpriseReportingInstance>::Observer overrides: |
| 30 void OnInstanceReady() override; | 34 void OnInstanceReady() override; |
| 31 | 35 |
| 32 // mojom::EnterpriseReportingHost overrides: | 36 // mojom::EnterpriseReportingHost overrides: |
| 33 void ReportManagementState(mojom::ManagementState state) override; | 37 void ReportManagementState(mojom::ManagementState state) override; |
| 38 void OnStatusRetrieved(const mojo::String& status, |
| 39 const mojo::String& droidGuardInfo) override; |
| 34 | 40 |
| 35 private: | 41 private: |
| 36 base::ThreadChecker thread_checker_; | 42 base::ThreadChecker thread_checker_; |
| 37 | 43 |
| 38 mojo::Binding<mojom::EnterpriseReportingHost> binding_; | 44 mojo::Binding<mojom::EnterpriseReportingHost> binding_; |
| 39 | 45 |
| 40 base::WeakPtrFactory<ArcEnterpriseReportingService> weak_ptr_factory_; | 46 base::WeakPtrFactory<ArcEnterpriseReportingService> weak_ptr_factory_; |
| 41 | 47 |
| 42 DISALLOW_COPY_AND_ASSIGN(ArcEnterpriseReportingService); | 48 DISALLOW_COPY_AND_ASSIGN(ArcEnterpriseReportingService); |
| 43 }; | 49 }; |
| 44 | 50 |
| 45 } // namespace arc | 51 } // namespace arc |
| 46 | 52 |
| 47 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_ | 53 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_ |
| OLD | NEW |