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

Side by Side Diff: chrome/browser/chromeos/file_manager/volume_manager.h

Issue 2348813002: Fix a bug that unmounting devices on the policy update can be a busy loop. (Closed)
Patch Set: Format fix, use reference where copy isn't needed. Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FILE_MANAGER_VOLUME_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 SnapshotManager* snapshot_manager() { return snapshot_manager_.get(); } 295 SnapshotManager* snapshot_manager() { return snapshot_manager_.get(); }
296 296
297 private: 297 private:
298 void OnDiskMountManagerRefreshed(bool success); 298 void OnDiskMountManagerRefreshed(bool success);
299 void OnStorageMonitorInitialized(); 299 void OnStorageMonitorInitialized();
300 void DoMountEvent(chromeos::MountError error_code, 300 void DoMountEvent(chromeos::MountError error_code,
301 const linked_ptr<Volume>& volume); 301 const linked_ptr<Volume>& volume);
302 void DoUnmountEvent(chromeos::MountError error_code, 302 void DoUnmountEvent(chromeos::MountError error_code,
303 const linked_ptr<Volume>& volume); 303 const linked_ptr<Volume>& volume);
304 void OnExternalStorageDisabledChangedUnmountCallback(
305 chromeos::MountError error_code);
304 306
305 Profile* profile_; 307 Profile* profile_;
306 drive::DriveIntegrationService* drive_integration_service_; // Not owned. 308 drive::DriveIntegrationService* drive_integration_service_; // Not owned.
307 chromeos::disks::DiskMountManager* disk_mount_manager_; // Not owned. 309 chromeos::disks::DiskMountManager* disk_mount_manager_; // Not owned.
308 PrefChangeRegistrar pref_change_registrar_; 310 PrefChangeRegistrar pref_change_registrar_;
309 base::ObserverList<VolumeManagerObserver> observers_; 311 base::ObserverList<VolumeManagerObserver> observers_;
310 chromeos::file_system_provider::Service* 312 chromeos::file_system_provider::Service*
311 file_system_provider_service_; // Not owned by this class. 313 file_system_provider_service_; // Not owned by this class.
312 GetMtpStorageInfoCallback get_mtp_storage_info_callback_; 314 GetMtpStorageInfoCallback get_mtp_storage_info_callback_;
313 std::map<std::string, linked_ptr<Volume>> mounted_volumes_; 315 std::map<std::string, linked_ptr<Volume>> mounted_volumes_;
314 std::unique_ptr<SnapshotManager> snapshot_manager_; 316 std::unique_ptr<SnapshotManager> snapshot_manager_;
315 317
316 // Note: This should remain the last member so it'll be destroyed and 318 // Note: This should remain the last member so it'll be destroyed and
317 // invalidate its weak pointers before any other members are destroyed. 319 // invalidate its weak pointers before any other members are destroyed.
318 base::WeakPtrFactory<VolumeManager> weak_ptr_factory_; 320 base::WeakPtrFactory<VolumeManager> weak_ptr_factory_;
319 DISALLOW_COPY_AND_ASSIGN(VolumeManager); 321 DISALLOW_COPY_AND_ASSIGN(VolumeManager);
320 }; 322 };
321 323
322 } // namespace file_manager 324 } // namespace file_manager
323 325
324 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ 326 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698