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/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/storage_monitor/removable_storage_observer.h" | 9 #include "chrome/browser/storage_monitor/removable_storage_observer.h" |
10 #include "chrome/browser/storage_monitor/transient_device_ids.h" | 10 #include "chrome/browser/storage_monitor/transient_device_ids.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // static | 123 // static |
124 void StorageMonitor::RemoveSingletonForTesting() { | 124 void StorageMonitor::RemoveSingletonForTesting() { |
125 g_storage_monitor = NULL; | 125 g_storage_monitor = NULL; |
126 } | 126 } |
127 | 127 |
128 StorageMonitor::Receiver* StorageMonitor::receiver() const { | 128 StorageMonitor::Receiver* StorageMonitor::receiver() const { |
129 return receiver_.get(); | 129 return receiver_.get(); |
130 } | 130 } |
131 | 131 |
132 void StorageMonitor::MarkInitialized() { | 132 void StorageMonitor::MarkInitialized() { |
| 133 LOG(INFO) << "Marking initialized..."; |
133 initialized_ = true; | 134 initialized_ = true; |
134 for (std::vector<base::Closure>::iterator iter = | 135 for (std::vector<base::Closure>::iterator iter = |
135 on_initialize_callbacks_.begin(); | 136 on_initialize_callbacks_.begin(); |
136 iter != on_initialize_callbacks_.end(); ++iter) { | 137 iter != on_initialize_callbacks_.end(); ++iter) { |
137 iter->Run(); | 138 iter->Run(); |
138 } | 139 } |
139 on_initialize_callbacks_.clear(); | 140 on_initialize_callbacks_.clear(); |
140 } | 141 } |
141 | 142 |
142 void StorageMonitor::ProcessAttach(const StorageInfo& info) { | 143 void StorageMonitor::ProcessAttach(const StorageInfo& info) { |
(...skipping 23 matching lines...) Expand all Loading... |
166 info = it->second; | 167 info = it->second; |
167 storage_map_.erase(it); | 168 storage_map_.erase(it); |
168 } | 169 } |
169 | 170 |
170 DVLOG(1) << "RemovableStorageDetached for id " << id; | 171 DVLOG(1) << "RemovableStorageDetached for id " << id; |
171 observer_list_->Notify( | 172 observer_list_->Notify( |
172 &RemovableStorageObserver::OnRemovableStorageDetached, info); | 173 &RemovableStorageObserver::OnRemovableStorageDetached, info); |
173 } | 174 } |
174 | 175 |
175 } // namespace chrome | 176 } // namespace chrome |
OLD | NEW |