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

Side by Side Diff: components/storage_monitor/storage_monitor_mac.mm

Issue 2834703003: Remove unmapped media galleries histograms. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « components/storage_monitor/storage_monitor_linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/storage_monitor_mac.h" 5 #include "components/storage_monitor/storage_monitor_mac.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 if (ShouldPostNotificationForDisk(it->second)) { 231 if (ShouldPostNotificationForDisk(it->second)) {
232 receiver()->ProcessDetach(it->second.device_id()); 232 receiver()->ProcessDetach(it->second.device_id());
233 } 233 }
234 } 234 }
235 235
236 if (update_type == UPDATE_DEVICE_REMOVED) { 236 if (update_type == UPDATE_DEVICE_REMOVED) {
237 if (it != disk_info_map_.end()) 237 if (it != disk_info_map_.end())
238 disk_info_map_.erase(it); 238 disk_info_map_.erase(it);
239 } else { 239 } else {
240 disk_info_map_[bsd_name] = info; 240 disk_info_map_[bsd_name] = info;
241 MediaStorageUtil::RecordDeviceInfoHistogram(true, info.device_id(),
242 info.storage_label());
243 if (ShouldPostNotificationForDisk(info)) 241 if (ShouldPostNotificationForDisk(info))
244 receiver()->ProcessAttach(info); 242 receiver()->ProcessAttach(info);
245 } 243 }
246 244
247 // We're not really honestly sure we're done, but this looks the best we 245 // We're not really honestly sure we're done, but this looks the best we
248 // can do. Any misses should go out through notifications. 246 // can do. Any misses should go out through notifications.
249 if (initialization_complete) 247 if (initialization_complete)
250 MarkInitialized(); 248 MarkInitialized();
251 } 249 }
252 250
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 } 380 }
383 } 381 }
384 return false; 382 return false;
385 } 383 }
386 384
387 StorageMonitor* StorageMonitor::CreateInternal() { 385 StorageMonitor* StorageMonitor::CreateInternal() {
388 return new StorageMonitorMac(); 386 return new StorageMonitorMac();
389 } 387 }
390 388
391 } // namespace storage_monitor 389 } // namespace storage_monitor
OLDNEW
« no previous file with comments | « components/storage_monitor/storage_monitor_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698