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

Unified Diff: webkit/fileapi/media/mtp_device_map_service.h

Issue 14247034: Move Media Galleries FileAPI code out of webkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr-14352004
Patch Set: Add android ifdef. 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 side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/media/mtp_device_map_service.h
diff --git a/webkit/fileapi/media/mtp_device_map_service.h b/webkit/fileapi/media/mtp_device_map_service.h
deleted file mode 100644
index de24ee2b11475f369b9362266498c8e510a6446b..0000000000000000000000000000000000000000
--- a/webkit/fileapi/media/mtp_device_map_service.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_
-#define WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_
-
-#include <map>
-
-#include "base/files/file_path.h"
-#include "base/lazy_instance.h"
-#include "base/threading/thread_checker.h"
-#include "webkit/storage/webkit_storage_export.h"
-
-namespace fileapi {
-
-class MTPDeviceAsyncDelegate;
-
-// This class provides media transfer protocol (MTP) device delegate to
-// complete media file system operations. ScopedMTPDeviceMapEntry class
-// manages the device map entries.
-class WEBKIT_STORAGE_EXPORT MTPDeviceMapService {
- public:
- static MTPDeviceMapService* GetInstance();
-
- /////////////////////////////////////////////////////////////////////////////
- // Following methods are used to manage MTPDeviceAsyncDelegate objects. //
- /////////////////////////////////////////////////////////////////////////////
- // Adds the MTP device delegate to the map service. |device_location|
- // specifies the mount location of the MTP device.
- // Called on the IO thread.
- void AddAsyncDelegate(const base::FilePath::StringType& device_location,
- MTPDeviceAsyncDelegate* delegate);
-
- // Removes the MTP device delegate from the map service. |device_location|
- // specifies the mount location of the MTP device.
- // Called on the IO thread.
- void RemoveAsyncDelegate(const base::FilePath::StringType& device_location);
-
- // Gets the media device delegate associated with |filesystem_id|.
- // Return NULL if the |filesystem_id| is no longer valid (e.g. because the
- // corresponding device is detached, etc).
- // Called on the IO thread.
- MTPDeviceAsyncDelegate* GetMTPDeviceAsyncDelegate(
- const std::string& filesystem_id);
-
- private:
- friend struct base::DefaultLazyInstanceTraits<MTPDeviceMapService>;
-
- // Mapping of device_location and MTPDeviceAsyncDelegate* object. It is safe
- // to store and access the raw pointer. This class operates on the IO thread.
- typedef std::map<base::FilePath::StringType, MTPDeviceAsyncDelegate*>
- AsyncDelegateMap;
-
- // Get access to this class using GetInstance() method.
- MTPDeviceMapService();
- ~MTPDeviceMapService();
-
- /////////////////////////////////////////////////////////////////////////////
- // Following member variables are used to manage asynchronous //
- // MTP device delegate objects. //
- /////////////////////////////////////////////////////////////////////////////
- // Map of attached mtp device async delegates.
- AsyncDelegateMap async_delegate_map_;
- base::ThreadChecker thread_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(MTPDeviceMapService);
-};
-
-} // namespace fileapi
-
-#endif // WEBKIT_FILEAPI_MEDIA_MTP_DEVICE_MAP_SERVICE_H_
« no previous file with comments | « webkit/fileapi/media/mtp_device_file_system_config.h ('k') | webkit/fileapi/media/mtp_device_map_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698