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

Side by Side Diff: components/arc/obb_mounter/arc_obb_mounter_bridge.cc

Issue 2599673005: arc: Use GET_INTERFACE_FOR_METHOD macro (Closed)
Patch Set: Addressed feedback Created 3 years, 11 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
« no previous file with comments | « components/arc/net/arc_net_host_impl.cc ('k') | components/arc/power/arc_power_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "components/arc/obb_mounter/arc_obb_mounter_bridge.h" 5 #include "components/arc/obb_mounter/arc_obb_mounter_bridge.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chromeos/dbus/arc_obb_mounter_client.h" 8 #include "chromeos/dbus/arc_obb_mounter_client.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "components/arc/arc_bridge_service.h" 10 #include "components/arc/arc_bridge_service.h"
(...skipping 14 matching lines...) Expand all
25 : ArcService(bridge_service), binding_(this) { 25 : ArcService(bridge_service), binding_(this) {
26 arc_bridge_service()->obb_mounter()->AddObserver(this); 26 arc_bridge_service()->obb_mounter()->AddObserver(this);
27 } 27 }
28 28
29 ArcObbMounterBridge::~ArcObbMounterBridge() { 29 ArcObbMounterBridge::~ArcObbMounterBridge() {
30 arc_bridge_service()->obb_mounter()->RemoveObserver(this); 30 arc_bridge_service()->obb_mounter()->RemoveObserver(this);
31 } 31 }
32 32
33 void ArcObbMounterBridge::OnInstanceReady() { 33 void ArcObbMounterBridge::OnInstanceReady() {
34 mojom::ObbMounterInstance* obb_mounter_instance = 34 mojom::ObbMounterInstance* obb_mounter_instance =
35 arc_bridge_service()->obb_mounter()->GetInstanceForMethod("Init"); 35 ARC_GET_INSTANCE_FOR_METHOD(arc_bridge_service()->obb_mounter(), Init);
36 DCHECK(obb_mounter_instance); 36 DCHECK(obb_mounter_instance);
37 obb_mounter_instance->Init(binding_.CreateInterfacePtrAndBind()); 37 obb_mounter_instance->Init(binding_.CreateInterfacePtrAndBind());
38 } 38 }
39 39
40 void ArcObbMounterBridge::MountObb(const std::string& obb_file, 40 void ArcObbMounterBridge::MountObb(const std::string& obb_file,
41 const std::string& target_path, 41 const std::string& target_path,
42 int32_t owner_gid, 42 int32_t owner_gid,
43 const MountObbCallback& callback) { 43 const MountObbCallback& callback) {
44 chromeos::DBusThreadManager::Get()->GetArcObbMounterClient()->MountObb( 44 chromeos::DBusThreadManager::Get()->GetArcObbMounterClient()->MountObb(
45 obb_file, target_path, owner_gid, base::Bind(&RunObbCallback, callback)); 45 obb_file, target_path, owner_gid, base::Bind(&RunObbCallback, callback));
46 } 46 }
47 47
48 void ArcObbMounterBridge::UnmountObb(const std::string& target_path, 48 void ArcObbMounterBridge::UnmountObb(const std::string& target_path,
49 const UnmountObbCallback& callback) { 49 const UnmountObbCallback& callback) {
50 chromeos::DBusThreadManager::Get()->GetArcObbMounterClient()->UnmountObb( 50 chromeos::DBusThreadManager::Get()->GetArcObbMounterClient()->UnmountObb(
51 target_path, base::Bind(&RunObbCallback, callback)); 51 target_path, base::Bind(&RunObbCallback, callback));
52 } 52 }
53 53
54 } // namespace arc 54 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/net/arc_net_host_impl.cc ('k') | components/arc/power/arc_power_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698