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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/event_router.h

Issue 23890002: Extract OnDiskEvent and OnFormatEvent logic part from EventRouter to VolumeManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/event_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 // drive::FileSystemObserver overrides. 100 // drive::FileSystemObserver overrides.
101 virtual void OnDirectoryChanged( 101 virtual void OnDirectoryChanged(
102 const base::FilePath& directory_path) OVERRIDE; 102 const base::FilePath& directory_path) OVERRIDE;
103 103
104 // drive::DriveIntegrationServiceObserver overrides. 104 // drive::DriveIntegrationServiceObserver overrides.
105 virtual void OnFileSystemMounted() OVERRIDE; 105 virtual void OnFileSystemMounted() OVERRIDE;
106 virtual void OnFileSystemBeingUnmounted() OVERRIDE; 106 virtual void OnFileSystemBeingUnmounted() OVERRIDE;
107 107
108 // VolumeManagerObserver overrides. 108 // VolumeManagerObserver overrides.
109 virtual void OnDiskAdded(
110 const chromeos::disks::DiskMountManager::Disk& disk,
111 bool mounting) OVERRIDE;
112 virtual void OnDiskRemoved(
113 const chromeos::disks::DiskMountManager::Disk& disk) OVERRIDE;
109 virtual void OnDeviceAdded(const std::string& device_path) OVERRIDE; 114 virtual void OnDeviceAdded(const std::string& device_path) OVERRIDE;
110 virtual void OnDeviceRemoved(const std::string& device_path) OVERRIDE; 115 virtual void OnDeviceRemoved(const std::string& device_path) OVERRIDE;
116 virtual void OnFormatStarted(
117 const std::string& device_path, bool success) OVERRIDE;
118 virtual void OnFormatCompleted(
119 const std::string& device_path, bool success) OVERRIDE;
111 120
112 private: 121 private:
113 typedef std::map<base::FilePath, FileWatcher*> WatcherMap; 122 typedef std::map<base::FilePath, FileWatcher*> WatcherMap;
114 123
115 // USB mount event handlers. 124 // USB mount event handlers.
116 void OnDiskAdded(const chromeos::disks::DiskMountManager::Disk* disk);
117 void OnDiskRemoved(const chromeos::disks::DiskMountManager::Disk* disk);
118 void OnDiskMounted(const chromeos::disks::DiskMountManager::Disk* disk); 125 void OnDiskMounted(const chromeos::disks::DiskMountManager::Disk* disk);
119 void OnDiskUnmounted(const chromeos::disks::DiskMountManager::Disk* disk); 126 void OnDiskUnmounted(const chromeos::disks::DiskMountManager::Disk* disk);
120 void OnFormatStarted(const std::string& device_path, bool success);
121 void OnFormatCompleted(const std::string& device_path, bool success);
122 127
123 // Called on change to kExternalStorageDisabled pref. 128 // Called on change to kExternalStorageDisabled pref.
124 void OnExternalStorageDisabledChanged(); 129 void OnExternalStorageDisabledChanged();
125 130
126 // Called when prefs related to file manager change. 131 // Called when prefs related to file manager change.
127 void OnFileManagerPrefsChanged(); 132 void OnFileManagerPrefsChanged();
128 133
129 // Process file watch notifications. 134 // Process file watch notifications.
130 void HandleFileWatchNotification(const base::FilePath& path, 135 void HandleFileWatchNotification(const base::FilePath& path,
131 bool got_error); 136 bool got_error);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 177
173 // Note: This should remain the last member so it'll be destroyed and 178 // Note: This should remain the last member so it'll be destroyed and
174 // invalidate the weak pointers before any other members are destroyed. 179 // invalidate the weak pointers before any other members are destroyed.
175 base::WeakPtrFactory<EventRouter> weak_factory_; 180 base::WeakPtrFactory<EventRouter> weak_factory_;
176 DISALLOW_COPY_AND_ASSIGN(EventRouter); 181 DISALLOW_COPY_AND_ASSIGN(EventRouter);
177 }; 182 };
178 183
179 } // namespace file_manager 184 } // namespace file_manager
180 185
181 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ 186 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698