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

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

Issue 14556015: [Media Galleries] Lazily initialize the storage monitor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix merge Created 7 years, 6 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 // 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_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ 8 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_
9 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ 9 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void GetMediaFileSystemsForExtension( 75 void GetMediaFileSystemsForExtension(
76 const content::RenderViewHost* rvh, 76 const content::RenderViewHost* rvh,
77 const extensions::Extension* extension, 77 const extensions::Extension* extension,
78 const MediaFileSystemsCallback& callback); 78 const MediaFileSystemsCallback& callback);
79 79
80 // Returns the initialized media galleries preferences for the specified 80 // Returns the initialized media galleries preferences for the specified
81 // |profile|. This method should be used instead of calling 81 // |profile|. This method should be used instead of calling
82 // MediaGalleriesPreferences directly because this method also ensures that 82 // MediaGalleriesPreferences directly because this method also ensures that
83 // currently attached removable devices are added to the preferences. 83 // currently attached removable devices are added to the preferences.
84 // Called on the UI thread. 84 // Called on the UI thread.
85 // Note: Caller must ensure that the storage monitor is initialized before
86 // calling this method.
85 MediaGalleriesPreferences* GetPreferences(Profile* profile); 87 MediaGalleriesPreferences* GetPreferences(Profile* profile);
86 88
87 // RemovableStorageObserver implementation. 89 // RemovableStorageObserver implementation.
88 virtual void OnRemovableStorageDetached(const StorageInfo& info) OVERRIDE; 90 virtual void OnRemovableStorageDetached(const StorageInfo& info) OVERRIDE;
89 91
90 private: 92 private:
91 friend class MediaFileSystemRegistryTest; 93 friend class MediaFileSystemRegistryTest;
92 friend class TestMediaFileSystemContext; 94 friend class TestMediaFileSystemContext;
93 class MediaFileSystemContextImpl; 95 class MediaFileSystemContextImpl;
94 96
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 MTPDeviceDelegateMap mtp_device_delegate_map_; 132 MTPDeviceDelegateMap mtp_device_delegate_map_;
131 133
132 scoped_ptr<MediaFileSystemContext> file_system_context_; 134 scoped_ptr<MediaFileSystemContext> file_system_context_;
133 135
134 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); 136 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry);
135 }; 137 };
136 138
137 } // namespace chrome 139 } // namespace chrome
138 140
139 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_ 141 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FILE_SYSTEM_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698