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

Side by Side Diff: device/media_transfer_protocol/media_transfer_protocol_manager.h

Issue 14016002: Storage Monitor: Make StorageMonitorLinux own the MediaTransferProtocolManager. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Rebase to ToT, still need to fix CrOS Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_MANAGER_H_ 5 #ifndef DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_MANAGER_H_
6 #define DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_MANAGER_H_ 6 #define DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual void GetFileInfoByPath(const std::string& storage_handle, 125 virtual void GetFileInfoByPath(const std::string& storage_handle,
126 const std::string& path, 126 const std::string& path,
127 const GetFileInfoCallback& callback) = 0; 127 const GetFileInfoCallback& callback) = 0;
128 128
129 // Gets the file metadata for |file_id| on |storage_handle| and runs 129 // Gets the file metadata for |file_id| on |storage_handle| and runs
130 // |callback|. 130 // |callback|.
131 virtual void GetFileInfoById(const std::string& storage_handle, 131 virtual void GetFileInfoById(const std::string& storage_handle,
132 uint32 file_id, 132 uint32 file_id,
133 const GetFileInfoCallback& callback) = 0; 133 const GetFileInfoCallback& callback) = 0;
134 134
135 // Creates the global MediaTransferProtocolManager instance. 135 // Creates and return the global MediaTransferProtocolManager instance.
Greg Billock 2013/04/10 18:27:25 returns
Lei Zhang 2013/04/11 06:54:04 Done.
136 // On Linux, |loop_proxy| specifies the message loop proxy to process 136 // On Linux, |loop_proxy| specifies the message loop proxy to process
137 // asynchronous operations. 137 // asynchronous operations.
138 // On ChromeOS, |loop_proxy| is set to NULL because ChromeOS already has a 138 // On ChromeOS, |loop_proxy| is set to NULL because ChromeOS already has a
139 // dedicated message loop proxy. 139 // dedicated message loop proxy.
140 static void Initialize(scoped_refptr<base::MessageLoopProxy> loop_proxy); 140 static MediaTransferProtocolManager* Initialize(
141 141 scoped_refptr<base::MessageLoopProxy> loop_proxy, bool is_dummy);
142 // Destroys the global MediaTransferProtocolManager instance if it exists.
143 static void Shutdown();
144
145 // Returns a pointer to the global MediaTransferProtocolManager instance.
146 // Initialize() should already have been called.
147 static MediaTransferProtocolManager* GetInstance();
148 }; 142 };
149 143
150 } // namespace device 144 } // namespace device
151 145
152 #endif // DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_MANAGER_H_ 146 #endif // DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698