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

Side by Side 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, 4 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/threading/thread_checker.h"
13 #include "components/arc/arc_bridge_service.h"
14 #include "components/arc/arc_service.h"
15 #include "components/arc/instance_holder.h"
16 #include "mojo/public/cpp/bindings/binding.h"
17
18 namespace arc {
19
20 // This class controls the ARC enterprise reporting.
21 class ArcEnterpriseReportingService
22 : public ArcService,
23 public InstanceHolder<mojom::EnterpriseReportingInstance>::Observer,
24 public mojom::EnterpriseReportingHost {
25 public:
26 explicit ArcEnterpriseReportingService(ArcBridgeService* arc_bridge_service);
27 ~ArcEnterpriseReportingService() override;
28
29 // InstanceHolder<mojom::EnterpriseReportingInstance>::Observer overrides:
30 void OnInstanceReady() override;
31
32 // mojom::EnterpriseReportingHost overrides:
33 void ReportManagementState(mojom::ManagementState state) override;
34
35 private:
36 // DBus callback, restarts ARC after ARC user data wipe.
37 void RestartArc(bool success);
38
39 base::ThreadChecker thread_checker_;
40
41 mojo::Binding<mojom::EnterpriseReportingHost> binding_;
42
43 base::WeakPtrFactory<ArcEnterpriseReportingService> weak_ptr_factory_;
44
45 DISALLOW_COPY_AND_ASSIGN(ArcEnterpriseReportingService);
46 };
47
48 } // namespace arc
49
50 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_ENTERPRISE_REPORTING_SERVICE_H_
OLDNEW
« 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