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

Side by Side Diff: chrome/browser/storage_monitor/volume_mount_watcher_win.cc

Issue 15896007: [SystemInfo API] Rewrite storage info provider using storage monitor impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix comments from thestig Created 7 years, 6 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 (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 #include "chrome/browser/storage_monitor/volume_mount_watcher_win.h" 5 #include "chrome/browser/storage_monitor/volume_mount_watcher_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <dbt.h> 9 #include <dbt.h>
10 #include <fileapi.h> 10 #include <fileapi.h>
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } 527 }
528 if (device_metadata_.erase(device.value()) == 0) { 528 if (device_metadata_.erase(device.value()) == 0) {
529 callback.Run(StorageMonitor::EJECT_FAILURE); 529 callback.Run(StorageMonitor::EJECT_FAILURE);
530 return; 530 return;
531 } 531 }
532 532
533 task_runner_->PostTask(FROM_HERE, 533 task_runner_->PostTask(FROM_HERE,
534 base::Bind(&EjectDeviceInThreadPool, device, callback, task_runner_, 0)); 534 base::Bind(&EjectDeviceInThreadPool, device, callback, task_runner_, 0));
535 } 535 }
536 536
537 std::vector<StorageInfo> VolumeMountWatcherWin::GetAllVolumeStorages() const {
538 std::vector<StorageInfo> results;
539 MountPointDeviceMetadataMap::const_iterator it;
540 for (it = device_metadata_.begin(); it != device_metadata_.end(); ++it)
541 results.push_back(it->second);
542 return results;
543 }
544
537 } // namespace chrome 545 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698