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

Side by Side Diff: chrome/browser/media_galleries/fileapi/mtp_device_map_service.h

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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
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 CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_MAP_SERVICE_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_MAP_SERVICE_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_MAP_SERVICE_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_MAP_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 22 matching lines...) Expand all
33 void RegisterMTPFileSystem(const base::FilePath::StringType& device_location, 33 void RegisterMTPFileSystem(const base::FilePath::StringType& device_location,
34 const std::string& filesystem_id, 34 const std::string& filesystem_id,
35 const bool read_only); 35 const bool read_only);
36 36
37 // Removes the MTP entry associated with the given 37 // Removes the MTP entry associated with the given
38 // |device_location|. Signals the MTPDeviceMapService to destroy the 38 // |device_location|. Signals the MTPDeviceMapService to destroy the
39 // delegate if there are no more uses of it. 39 // delegate if there are no more uses of it.
40 void RevokeMTPFileSystem(const std::string& filesystem_id); 40 void RevokeMTPFileSystem(const std::string& filesystem_id);
41 41
42 private: 42 private:
43 friend struct base::DefaultLazyInstanceTraits<MTPDeviceMapService>; 43 friend struct base::LazyInstanceTraitsBase<MTPDeviceMapService>;
44 44
45 // Adds the MTP device delegate to the map service. |device_location| 45 // Adds the MTP device delegate to the map service. |device_location|
46 // specifies the mount location of the MTP device. 46 // specifies the mount location of the MTP device.
47 // Called on the IO thread. 47 // Called on the IO thread.
48 void AddAsyncDelegate(const base::FilePath::StringType& device_location, 48 void AddAsyncDelegate(const base::FilePath::StringType& device_location,
49 const bool read_only, 49 const bool read_only,
50 MTPDeviceAsyncDelegate* delegate); 50 MTPDeviceAsyncDelegate* delegate);
51 51
52 // Removes the MTP device delegate from the map service. |device_location| 52 // Removes the MTP device delegate from the map service. |device_location|
53 // specifies the mount location of the MTP device. 53 // specifies the mount location of the MTP device.
(...skipping 29 matching lines...) Expand all
83 AsyncDelegateMap async_delegate_map_; 83 AsyncDelegateMap async_delegate_map_;
84 84
85 MTPDeviceFileSystemMap mtp_device_map_; 85 MTPDeviceFileSystemMap mtp_device_map_;
86 86
87 MTPDeviceUsageMap mtp_device_usage_map_; 87 MTPDeviceUsageMap mtp_device_usage_map_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(MTPDeviceMapService); 89 DISALLOW_COPY_AND_ASSIGN(MTPDeviceMapService);
90 }; 90 };
91 91
92 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_MAP_SERVICE_H_ 92 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_MAP_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698