Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chromeos / dbus / fake_permission_broker_client.cc
blob067dca7e640dfd1839d139c89080f0ea472cbfc3
1 // Copyright 2013 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.
5 #include "chromeos/dbus/fake_permission_broker_client.h"
7 #include "base/callback.h"
8 #include "base/logging.h"
9 #include "dbus/file_descriptor.h"
11 namespace chromeos {
13 FakePermissionBrokerClient::FakePermissionBrokerClient() {}
15 FakePermissionBrokerClient::~FakePermissionBrokerClient() {}
17 void FakePermissionBrokerClient::Init(dbus::Bus* bus) {}
19 void FakePermissionBrokerClient::CheckPathAccess(
20 const std::string& path,
21 const ResultCallback& callback) {
22 callback.Run(true);
25 void FakePermissionBrokerClient::RequestPathAccess(
26 const std::string& path,
27 int interface_id,
28 const ResultCallback& callback) {
29 callback.Run(true);
32 void FakePermissionBrokerClient::RequestTcpPortAccess(
33 uint16 port,
34 const std::string& interface,
35 const dbus::FileDescriptor& lifeline_fd,
36 const ResultCallback& callback) {
37 DCHECK(lifeline_fd.is_valid());
38 callback.Run(true);
41 void FakePermissionBrokerClient::RequestUdpPortAccess(
42 uint16 port,
43 const std::string& interface,
44 const dbus::FileDescriptor& lifeline_fd,
45 const ResultCallback& callback) {
46 DCHECK(lifeline_fd.is_valid());
47 callback.Run(true);
50 void FakePermissionBrokerClient::ReleaseTcpPort(
51 uint16 port,
52 const std::string& interface,
53 const ResultCallback& callback) {
54 callback.Run(true);
57 void FakePermissionBrokerClient::ReleaseUdpPort(
58 uint16 port,
59 const std::string& interface,
60 const ResultCallback& callback) {
61 callback.Run(true);
64 } // namespace chromeos