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

Unified Diff: device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc

Issue 57333002: ChromeOS: Accept NULL SystemBus in MediaTransferProtocolManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check GetBus() in destructor. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc
diff --git a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc
index 52e8e633d18379320b4ad333aee7793135cac431..a65bf818493c0eca0b2925644e3bdda69df56e1d 100644
--- a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc
+++ b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc
@@ -408,67 +408,6 @@ class MediaTransferProtocolDaemonClientImpl
DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDaemonClientImpl);
};
-// A stub implementaion of MediaTransferProtocolDaemonClient.
-class MediaTransferProtocolDaemonClientStubImpl
- : public MediaTransferProtocolDaemonClient {
- public:
- MediaTransferProtocolDaemonClientStubImpl() {}
- virtual ~MediaTransferProtocolDaemonClientStubImpl() {}
-
- virtual void EnumerateStorages(
- const EnumerateStoragesCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void GetStorageInfo(
- const std::string& storage_name,
- const GetStorageInfoCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void OpenStorage(const std::string& storage_name,
- const std::string& mode,
- const OpenStorageCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void CloseStorage(const std::string& handle,
- const CloseStorageCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void ReadDirectoryByPath(
- const std::string& handle,
- const std::string& path,
- const ReadDirectoryCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void ReadDirectoryById(
- const std::string& handle,
- uint32 file_id,
- const ReadDirectoryCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void ReadFileChunkByPath(
- const std::string& handle,
- const std::string& path,
- uint32 offset,
- uint32 length,
- const ReadFileCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void ReadFileChunkById(
- const std::string& handle,
- uint32 file_id,
- uint32 offset,
- uint32 length,
- const ReadFileCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void GetFileInfoByPath(
- const std::string& handle,
- const std::string& path,
- const GetFileInfoCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void GetFileInfoById(const std::string& handle,
- uint32 file_id,
- const GetFileInfoCallback& callback,
- const ErrorCallback& error_callback) OVERRIDE {}
- virtual void SetUpConnections(
- const MTPStorageEventHandler& handler) OVERRIDE {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDaemonClientStubImpl);
-};
-
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -479,10 +418,8 @@ MediaTransferProtocolDaemonClient::MediaTransferProtocolDaemonClient() {}
MediaTransferProtocolDaemonClient::~MediaTransferProtocolDaemonClient() {}
// static
-MediaTransferProtocolDaemonClient*
-MediaTransferProtocolDaemonClient::Create(dbus::Bus* bus, bool is_stub) {
- if (is_stub)
- return new MediaTransferProtocolDaemonClientStubImpl();
+MediaTransferProtocolDaemonClient* MediaTransferProtocolDaemonClient::Create(
+ dbus::Bus* bus) {
return new MediaTransferProtocolDaemonClientImpl(bus);
}

Powered by Google App Engine
This is Rietveld 408576698