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

Side by Side Diff: chrome/browser/media_gallery/media_file_system_registry.h

Issue 10821077: Add gallery permissions to Media Galleries Preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 4 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 // MediaFileSystemRegistry registers pictures directories and media devices as 5 // MediaFileSystemRegistry registers pictures directories and media devices as
6 // File API filesystems and keeps track of the path to filesystem ID mappings. 6 // File API filesystems and keeps track of the path to filesystem ID mappings.
7 7
8 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ 8 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_
9 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ 9 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const extensions::Extension& extension); 55 const extensions::Extension& extension);
56 56
57 // base::SystemMonitor::DevicesChangedObserver implementation. 57 // base::SystemMonitor::DevicesChangedObserver implementation.
58 virtual void OnMediaDeviceDetached(const std::string& id) OVERRIDE; 58 virtual void OnMediaDeviceDetached(const std::string& id) OVERRIDE;
59 59
60 // content::NotificationObserver implementation. 60 // content::NotificationObserver implementation.
61 virtual void Observe(int type, 61 virtual void Observe(int type,
62 const content::NotificationSource& source, 62 const content::NotificationSource& source,
63 const content::NotificationDetails& details) OVERRIDE; 63 const content::NotificationDetails& details) OVERRIDE;
64 64
65 std::string GetDeviceIdFromPath(const FilePath& path);
Lei Zhang 2012/08/03 19:22:04 nit: const and return const std::string& ?
vandebo (ex-Chrome) 2012/08/03 20:27:27 const Done. method may create the return value th
66
65 private: 67 private:
66 friend struct base::DefaultLazyInstanceTraits<MediaFileSystemRegistry>; 68 friend struct base::DefaultLazyInstanceTraits<MediaFileSystemRegistry>;
67 69
68 // Mapping of media directories to filesystem IDs. 70 // Mapping of media directories to filesystem IDs.
69 typedef std::map<FilePath, std::string> MediaPathToFSIDMap; 71 typedef std::map<FilePath, std::string> MediaPathToFSIDMap;
70 72
71 // Mapping of RPH to MediaPathToFSIDMaps. 73 // Mapping of RPH to MediaPathToFSIDMaps.
72 typedef std::map<const content::RenderProcessHost*, 74 typedef std::map<const content::RenderProcessHost*,
73 MediaPathToFSIDMap> ChildIdToMediaFSMap; 75 MediaPathToFSIDMap> ChildIdToMediaFSMap;
74 76
(...skipping 23 matching lines...) Expand all
98 100
99 // Is only used on the UI thread. 101 // Is only used on the UI thread.
100 content::NotificationRegistrar registrar_; 102 content::NotificationRegistrar registrar_;
101 103
102 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); 104 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry);
103 }; 105 };
104 106
105 } // namespace chrome 107 } // namespace chrome
106 108
107 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ 109 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698