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

Unified Diff: chrome/browser/intents/device_attached_intent_source.cc

Issue 10780023: Change base::SystemMonitor's media device functions to take a type and string16 instead of a FilePa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros 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/intents/device_attached_intent_source.cc
===================================================================
--- chrome/browser/intents/device_attached_intent_source.cc (revision 147551)
+++ chrome/browser/intents/device_attached_intent_source.cc (working copy)
@@ -31,16 +31,21 @@
}
void DeviceAttachedIntentSource::OnMediaDeviceAttached(
- const base::SystemMonitor::DeviceIdType& id,
- const std::string& name,
- const FilePath& device_path) {
+ const std::string& id,
+ const string16& name,
+ base::SystemMonitor::MediaDeviceType type,
+ const FilePath::StringType& location) {
if (!browser_->window()->IsActive())
return;
+ // Only handle FilePaths for now.
+ if (type != SystemMonitor::TYPE_PATH)
+ return;
+
// Sanity checks for |device_path|.
- if (!device_path.IsAbsolute() || device_path.ReferencesParent()) {
+ const FilePath device_path(location);
+ if (!device_path.IsAbsolute() || device_path.ReferencesParent())
return;
- }
std::string device_name;
@@ -56,7 +61,6 @@
device_name,
filesystem_id);
- content::WebIntentsDispatcher* dispatcher =
- content::WebIntentsDispatcher::Create(intent);
- delegate_->WebIntentDispatch(NULL, dispatcher);
+ delegate_->WebIntentDispatch(NULL /* no WebContents */,
+ content::WebIntentsDispatcher::Create(intent));
}

Powered by Google App Engine
This is Rietveld 408576698