| 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 "chrome/browser/storage_monitor/storage_monitor.h" | 5 #include "chrome/browser/storage_monitor/storage_monitor.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/storage_monitor/removable_storage_observer.h" | 10 #include "chrome/browser/storage_monitor/removable_storage_observer.h" |
| 11 #include "chrome/browser/storage_monitor/transient_device_ids.h" | 11 #include "chrome/browser/storage_monitor/transient_device_ids.h" |
| 12 | 12 |
| 13 namespace chrome { | |
| 14 | |
| 15 StorageMonitor::Receiver::~Receiver() { | 13 StorageMonitor::Receiver::~Receiver() { |
| 16 } | 14 } |
| 17 | 15 |
| 18 class StorageMonitor::ReceiverImpl : public StorageMonitor::Receiver { | 16 class StorageMonitor::ReceiverImpl : public StorageMonitor::Receiver { |
| 19 public: | 17 public: |
| 20 explicit ReceiverImpl(StorageMonitor* notifications) | 18 explicit ReceiverImpl(StorageMonitor* notifications) |
| 21 : notifications_(notifications) {} | 19 : notifications_(notifications) {} |
| 22 | 20 |
| 23 virtual ~ReceiverImpl() {} | 21 virtual ~ReceiverImpl() {} |
| 24 | 22 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 info = it->second; | 165 info = it->second; |
| 168 storage_map_.erase(it); | 166 storage_map_.erase(it); |
| 169 } | 167 } |
| 170 | 168 |
| 171 DVLOG(1) << "StorageDetached for id " << id; | 169 DVLOG(1) << "StorageDetached for id " << id; |
| 172 if (StorageInfo::IsRemovableDevice(info.device_id())) { | 170 if (StorageInfo::IsRemovableDevice(info.device_id())) { |
| 173 observer_list_->Notify( | 171 observer_list_->Notify( |
| 174 &RemovableStorageObserver::OnRemovableStorageDetached, info); | 172 &RemovableStorageObserver::OnRemovableStorageDetached, info); |
| 175 } | 173 } |
| 176 } | 174 } |
| 177 | |
| 178 } // namespace chrome | |
| OLD | NEW |