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

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

Issue 2495913002: arc: Convert more Mojo types to STL (Closed)
Patch Set: Rebased to ToT Created 4 years, 1 month 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/obb_mounter/arc_obb_mounter_bridge.h ('k') | no next file » | 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 19 matching lines...) Expand all
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_bridge_service()->obb_mounter()->GetInstanceForMethod("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 mojo::String& obb_file, 40 void ArcObbMounterBridge::MountObb(const std::string& obb_file,
41 const mojo::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.get(), target_path.get(), owner_gid, 45 obb_file, target_path, owner_gid, base::Bind(&RunObbCallback, callback));
46 base::Bind(&RunObbCallback, callback));
47 } 46 }
48 47
49 void ArcObbMounterBridge::UnmountObb(const mojo::String& target_path, 48 void ArcObbMounterBridge::UnmountObb(const std::string& target_path,
50 const UnmountObbCallback& callback) { 49 const UnmountObbCallback& callback) {
51 chromeos::DBusThreadManager::Get()->GetArcObbMounterClient()->UnmountObb( 50 chromeos::DBusThreadManager::Get()->GetArcObbMounterClient()->UnmountObb(
52 target_path.get(), base::Bind(&RunObbCallback, callback)); 51 target_path, base::Bind(&RunObbCallback, callback));
53 } 52 }
54 53
55 } // namespace arc 54 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/obb_mounter/arc_obb_mounter_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698