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

Side by Side Diff: chrome/browser/media_gallery/media_device_notifications_linux.cc

Issue 10069007: Media Gallery: Move MediaDeviceNotificationsLinux from content to chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: clang Created 8 years, 8 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 // MediaDeviceNotificationsLinux implementation. 5 // MediaDeviceNotificationsLinux implementation.
6 6
7 #include "content/browser/media_device_notifications_linux.h" 7 #include "chrome/browser/media_gallery/media_device_notifications_linux.h"
8 8
9 #include <mntent.h> 9 #include <mntent.h>
10 #include <stdio.h> 10 #include <stdio.h>
11 11
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/file_path.h" 15 #include "base/file_path.h"
16 #include "base/file_util.h" 16 #include "base/file_util.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
(...skipping 13 matching lines...) Expand all
31 "hfsplus", 31 "hfsplus",
32 "iso9660", 32 "iso9660",
33 "msdos", 33 "msdos",
34 "ntfs", 34 "ntfs",
35 "udf", 35 "udf",
36 "vfat", 36 "vfat",
37 }; 37 };
38 38
39 } // namespace 39 } // namespace
40 40
41 namespace content { 41 namespace chrome {
42 42
43 using base::SystemMonitor; 43 using base::SystemMonitor;
44 using content::BrowserThread;
44 45
45 // A simple pass-through class. MediaDeviceNotificationsLinux cannot directly 46 // A simple pass-through class. MediaDeviceNotificationsLinux cannot directly
46 // inherit from FilePathWatcher::Delegate due to multiple inheritance. 47 // inherit from FilePathWatcher::Delegate due to multiple inheritance.
47 class MediaDeviceNotificationsLinux::WatcherDelegate 48 class MediaDeviceNotificationsLinux::WatcherDelegate
48 : public base::files::FilePathWatcher::Delegate { 49 : public base::files::FilePathWatcher::Delegate {
49 public: 50 public:
50 explicit WatcherDelegate(MediaDeviceNotificationsLinux* notifier); 51 explicit WatcherDelegate(MediaDeviceNotificationsLinux* notifier);
51 52
52 // base::files::FilePathWatcher::Delegate implementation. 53 // base::files::FilePathWatcher::Delegate implementation.
53 virtual void OnFilePathChanged(const FilePath& path) OVERRIDE; 54 virtual void OnFilePathChanged(const FilePath& path) OVERRIDE;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 mount_device, 269 mount_device,
269 FilePath(mount_point)); 270 FilePath(mount_point));
270 } 271 }
271 272
272 void MediaDeviceNotificationsLinux::RemoveOldDevice( 273 void MediaDeviceNotificationsLinux::RemoveOldDevice(
273 const base::SystemMonitor::DeviceIdType& device_id) { 274 const base::SystemMonitor::DeviceIdType& device_id) {
274 base::SystemMonitor* system_monitor = base::SystemMonitor::Get(); 275 base::SystemMonitor* system_monitor = base::SystemMonitor::Get();
275 system_monitor->ProcessMediaDeviceDetached(device_id); 276 system_monitor->ProcessMediaDeviceDetached(device_id);
276 } 277 }
277 278
278 } // namespace content 279 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698