Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h

Issue 2195653002: arc: add enterprise_reporting.mojom interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Corrected upstream branch. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.cc ('k') | chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698