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

Unified Diff: chrome/browser/media_gallery/media_file_system_registry.cc

Issue 10821077: Add gallery permissions to Media Galleries Preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a default gallery Created 8 years, 5 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: chrome/browser/media_gallery/media_file_system_registry.cc
diff --git a/chrome/browser/media_gallery/media_file_system_registry.cc b/chrome/browser/media_gallery/media_file_system_registry.cc
index ebeca1a5bb4e959de449d0b218c6d4c1ce1af0a5..afacffbd950bf1446223a9fc4b98e69bc6d3cba9 100644
--- a/chrome/browser/media_gallery/media_file_system_registry.cc
+++ b/chrome/browser/media_gallery/media_file_system_registry.cc
@@ -12,6 +12,7 @@
#include "base/path_service.h"
#include "base/system_monitor/system_monitor.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension.h"
@@ -63,6 +64,7 @@ MediaFileSystemRegistry::GetMediaFileSystemsForExtension(
const extensions::Extension& extension) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ //Profile* profile = Profile::FromBrowserContext(rph->GetBrowserContext());
Elliot Glaysher 2012/08/02 23:23:51 stray line?
std::vector<MediaFSInfo> results;
std::pair<ChildIdToMediaFSMap::iterator, bool> ret =
media_fs_map_.insert(std::make_pair(rph, MediaPathToFSIDMap()));
@@ -136,6 +138,13 @@ void MediaFileSystemRegistry::Observe(
UnregisterForRPHGoneNotifications(rph);
}
+std::string MediaFileSystemRegistry::GetDeviceIdFromPath(const FilePath& path) {
+ // TODO(vandebo) Do something better here.
+ // Iterate system monitor attached media devices looking for a match. If not,
+ // return the path.
+ return path.value();
+}
+
/******************
* Private methods
******************/

Powered by Google App Engine
This is Rietveld 408576698