| Index: chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h
|
| diff --git a/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h b/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..129b68d5fced2d48fdea9495505d4c4309f63d4a
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h
|
| @@ -0,0 +1,50 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_
|
| +#define CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "base/threading/thread_checker.h"
|
| +#include "components/arc/arc_bridge_service.h"
|
| +#include "components/arc/arc_service.h"
|
| +#include "components/arc/instance_holder.h"
|
| +#include "mojo/public/cpp/bindings/binding.h"
|
| +
|
| +namespace arc {
|
| +
|
| +// This class controls the ARC enterprise reporting.
|
| +class ArcEnterpriseReportingService
|
| + : public ArcService,
|
| + public InstanceHolder<mojom::EnterpriseReportingInstance>::Observer,
|
| + public mojom::EnterpriseReportingHost {
|
| + public:
|
| + explicit ArcEnterpriseReportingService(ArcBridgeService* arc_bridge_service);
|
| + ~ArcEnterpriseReportingService() override;
|
| +
|
| + // InstanceHolder<mojom::EnterpriseReportingInstance>::Observer overrides:
|
| + void OnInstanceReady() override;
|
| +
|
| + // mojom::EnterpriseReportingHost overrides:
|
| + void ReportManagementState(mojom::ManagementState state) override;
|
| +
|
| + private:
|
| + // DBus callback, restarts ARC after ARC user data wipe.
|
| + void RestartArc(bool success);
|
| +
|
| + base::ThreadChecker thread_checker_;
|
| +
|
| + mojo::Binding<mojom::EnterpriseReportingHost> binding_;
|
| +
|
| + base::WeakPtrFactory<ArcEnterpriseReportingService> weak_ptr_factory_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ArcEnterpriseReportingService);
|
| +};
|
| +
|
| +} // namespace arc
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_
|
|
|