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

Side by Side Diff: chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.h

Issue 2693013006: arc: Add cryptohome_id to EmitArcBooted. (Closed)
Patch Set: Address Luis's comments. Created 3 years, 10 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
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_BOOT_PHASE_MONITOR_ARC_BOOT_PHASE_MONITOR_BR IDGE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_BOOT_PHASE_MONITOR_BR IDGE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_BOOT_PHASE_MONITOR_BR IDGE_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_BOOT_PHASE_MONITOR_BR IDGE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
12 #include "components/arc/arc_service.h" 12 #include "components/arc/arc_service.h"
13 #include "components/arc/common/boot_phase_monitor.mojom.h" 13 #include "components/arc/common/boot_phase_monitor.mojom.h"
14 #include "components/arc/instance_holder.h" 14 #include "components/arc/instance_holder.h"
15 #include "components/signin/core/account_id/account_id.h"
15 #include "mojo/public/cpp/bindings/binding.h" 16 #include "mojo/public/cpp/bindings/binding.h"
16 17
17 namespace arc { 18 namespace arc {
18 19
19 class ArcBridgeService; 20 class ArcBridgeService;
20 class ArcInstanceThrottle; 21 class ArcInstanceThrottle;
21 22
22 // Receives boot phase notifications from ARC. 23 // Receives boot phase notifications from ARC.
23 class ArcBootPhaseMonitorBridge 24 class ArcBootPhaseMonitorBridge
24 : public ArcService, 25 : public ArcService,
25 public InstanceHolder<mojom::BootPhaseMonitorInstance>::Observer, 26 public InstanceHolder<mojom::BootPhaseMonitorInstance>::Observer,
26 public mojom::BootPhaseMonitorHost { 27 public mojom::BootPhaseMonitorHost {
27 public: 28 public:
28 explicit ArcBootPhaseMonitorBridge(ArcBridgeService* bridge_service); 29 ArcBootPhaseMonitorBridge(ArcBridgeService* bridge_service,
30 const AccountId& account_id);
29 ~ArcBootPhaseMonitorBridge() override; 31 ~ArcBootPhaseMonitorBridge() override;
30 32
31 // InstanceHolder<mojom::BootPhaseMonitorInstance>::Observer 33 // InstanceHolder<mojom::BootPhaseMonitorInstance>::Observer
32 void OnInstanceReady() override; 34 void OnInstanceReady() override;
33 void OnInstanceClosed() override; 35 void OnInstanceClosed() override;
34 36
35 // mojom::BootPhaseMonitorHost 37 // mojom::BootPhaseMonitorHost
36 void OnBootCompleted() override; 38 void OnBootCompleted() override;
37 39
38 private: 40 private:
41 const AccountId account_id_;
39 mojo::Binding<mojom::BootPhaseMonitorHost> binding_; 42 mojo::Binding<mojom::BootPhaseMonitorHost> binding_;
40 std::unique_ptr<ArcInstanceThrottle> throttle_; 43 std::unique_ptr<ArcInstanceThrottle> throttle_;
41 44
42 base::ThreadChecker thread_checker_; 45 base::ThreadChecker thread_checker_;
43 46
44 DISALLOW_COPY_AND_ASSIGN(ArcBootPhaseMonitorBridge); 47 DISALLOW_COPY_AND_ASSIGN(ArcBootPhaseMonitorBridge);
45 }; 48 };
46 49
47 } // namespace arc 50 } // namespace arc
48 51
49 #endif // CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_BOOT_PHASE_MONITOR _BRIDGE_H_ 52 #endif // CHROME_BROWSER_CHROMEOS_ARC_BOOT_PHASE_MONITOR_ARC_BOOT_PHASE_MONITOR _BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698