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

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

Issue 12212083: Media Galleries: Only try to initialize removable media galleries once per profile. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 10 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // currently attached removable devices are added to the preferences. 87 // currently attached removable devices are added to the preferences.
88 // Called on the UI thread. 88 // Called on the UI thread.
89 MediaGalleriesPreferences* GetPreferences(Profile* profile); 89 MediaGalleriesPreferences* GetPreferences(Profile* profile);
90 90
91 // RemovableStorageObserver implementation. 91 // RemovableStorageObserver implementation.
92 virtual void OnRemovableStorageAttached( 92 virtual void OnRemovableStorageAttached(
93 const RemovableStorageNotifications::StorageInfo& info) OVERRIDE; 93 const RemovableStorageNotifications::StorageInfo& info) OVERRIDE;
94 virtual void OnRemovableStorageDetached( 94 virtual void OnRemovableStorageDetached(
95 const RemovableStorageNotifications::StorageInfo& info) OVERRIDE; 95 const RemovableStorageNotifications::StorageInfo& info) OVERRIDE;
96 96
97 size_t GetExtensionHostCountForTests() const; 97 size_t GetExtensionGalleriesHostCountForTests() const;
98 98
99 // See TransientDeviceIds::GetTransientIdForDeviceId(). 99 // See TransientDeviceIds::GetTransientIdForDeviceId().
100 uint64 GetTransientIdForDeviceId(const std::string& device_id); 100 uint64 GetTransientIdForDeviceId(const std::string& device_id);
101 101
102 // Keys for metadata about a media gallery file system. 102 // Keys for metadata about a media gallery file system.
103 static const char kDeviceIdKey[]; 103 static const char kDeviceIdKey[];
104 static const char kGalleryIdKey[]; 104 static const char kGalleryIdKey[];
105 static const char kNameKey[]; 105 static const char kNameKey[];
106 106
107 private: 107 private:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 scoped_ptr<MediaFileSystemContext> file_system_context_; 154 scoped_ptr<MediaFileSystemContext> file_system_context_;
155 155
156 TransientDeviceIds transient_device_ids_; 156 TransientDeviceIds transient_device_ids_;
157 157
158 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); 158 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry);
159 }; 159 };
160 160
161 } // namespace chrome 161 } // namespace chrome
162 162
163 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ 163 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698