OLD | NEW |
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 "chromeos/disks/disk_mount_manager.h" | 5 #include "chromeos/disks/disk_mount_manager.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 it->second->device_path() == path) { | 581 it->second->device_path() == path) { |
582 *device_path = it->second->device_path(); | 582 *device_path = it->second->device_path(); |
583 return; | 583 return; |
584 } | 584 } |
585 } | 585 } |
586 } | 586 } |
587 | 587 |
588 // Finds system path prefix from |system_path|. | 588 // Finds system path prefix from |system_path|. |
589 const std::string& FindSystemPathPrefix(const std::string& system_path) { | 589 const std::string& FindSystemPathPrefix(const std::string& system_path) { |
590 if (system_path.empty()) | 590 if (system_path.empty()) |
591 return EmptyString(); | 591 return base::EmptyString(); |
592 for (SystemPathPrefixSet::const_iterator it = system_path_prefixes_.begin(); | 592 for (SystemPathPrefixSet::const_iterator it = system_path_prefixes_.begin(); |
593 it != system_path_prefixes_.end(); | 593 it != system_path_prefixes_.end(); |
594 ++it) { | 594 ++it) { |
595 const std::string& prefix = *it; | 595 const std::string& prefix = *it; |
596 if (StartsWithASCII(system_path, prefix, true)) | 596 if (StartsWithASCII(system_path, prefix, true)) |
597 return prefix; | 597 return prefix; |
598 } | 598 } |
599 return EmptyString(); | 599 return base::EmptyString(); |
600 } | 600 } |
601 | 601 |
602 // Mount event change observers. | 602 // Mount event change observers. |
603 ObserverList<Observer> observers_; | 603 ObserverList<Observer> observers_; |
604 | 604 |
605 CrosDisksClient* cros_disks_client_; | 605 CrosDisksClient* cros_disks_client_; |
606 | 606 |
607 // The list of disks found. | 607 // The list of disks found. |
608 DiskMountManager::DiskMap disks_; | 608 DiskMountManager::DiskMap disks_; |
609 | 609 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 VLOG(1) << "DiskMountManager Shutdown completed"; | 732 VLOG(1) << "DiskMountManager Shutdown completed"; |
733 } | 733 } |
734 | 734 |
735 // static | 735 // static |
736 DiskMountManager* DiskMountManager::GetInstance() { | 736 DiskMountManager* DiskMountManager::GetInstance() { |
737 return g_disk_mount_manager; | 737 return g_disk_mount_manager; |
738 } | 738 } |
739 | 739 |
740 } // namespace disks | 740 } // namespace disks |
741 } // namespace chromeos | 741 } // namespace chromeos |
OLD | NEW |