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

Side by Side Diff: components/storage_monitor/volume_mount_watcher_win.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/storage_monitor/volume_mount_watcher_win.h" 5 #include "components/storage_monitor/volume_mount_watcher_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 device_info_task_runner_.get(), FROM_HERE, GetAttachedDevicesCallback(), 365 device_info_task_runner_.get(), FROM_HERE, GetAttachedDevicesCallback(),
366 base::Bind(&VolumeMountWatcherWin::AddDevicesOnUIThread, 366 base::Bind(&VolumeMountWatcherWin::AddDevicesOnUIThread,
367 weak_factory_.GetWeakPtr())); 367 weak_factory_.GetWeakPtr()));
368 } 368 }
369 369
370 void VolumeMountWatcherWin::AddDevicesOnUIThread( 370 void VolumeMountWatcherWin::AddDevicesOnUIThread(
371 std::vector<base::FilePath> removable_devices) { 371 std::vector<base::FilePath> removable_devices) {
372 DCHECK_CURRENTLY_ON(BrowserThread::UI); 372 DCHECK_CURRENTLY_ON(BrowserThread::UI);
373 373
374 for (size_t i = 0; i < removable_devices.size(); i++) { 374 for (size_t i = 0; i < removable_devices.size(); i++) {
375 if (ContainsKey(pending_device_checks_, removable_devices[i])) 375 if (base::ContainsKey(pending_device_checks_, removable_devices[i]))
376 continue; 376 continue;
377 pending_device_checks_.insert(removable_devices[i]); 377 pending_device_checks_.insert(removable_devices[i]);
378 device_info_task_runner_->PostTask( 378 device_info_task_runner_->PostTask(
379 FROM_HERE, 379 FROM_HERE,
380 base::Bind(&VolumeMountWatcherWin::RetrieveInfoForDeviceAndAdd, 380 base::Bind(&VolumeMountWatcherWin::RetrieveInfoForDeviceAndAdd,
381 removable_devices[i], GetDeviceDetailsCallback(), 381 removable_devices[i], GetDeviceDetailsCallback(),
382 weak_factory_.GetWeakPtr())); 382 weak_factory_.GetWeakPtr()));
383 } 383 }
384 } 384 }
385 385
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 callback.Run(StorageMonitor::EJECT_FAILURE); 547 callback.Run(StorageMonitor::EJECT_FAILURE);
548 return; 548 return;
549 } 549 }
550 550
551 device_info_task_runner_->PostTask( 551 device_info_task_runner_->PostTask(
552 FROM_HERE, base::Bind(&EjectDeviceInThreadPool, device, callback, 552 FROM_HERE, base::Bind(&EjectDeviceInThreadPool, device, callback,
553 device_info_task_runner_, 0)); 553 device_info_task_runner_, 0));
554 } 554 }
555 555
556 } // namespace storage_monitor 556 } // namespace storage_monitor
OLDNEW
« no previous file with comments | « components/storage_monitor/transient_device_ids.cc ('k') | components/sync/base/unique_position.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698