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

Side by Side Diff: chrome/browser/system_monitor/removable_device_notifications_mac.mm

Issue 10933114: Combine boolean MediaDeviceNotifications histograms to an enumerated histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style nit Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
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/system_monitor/removable_device_notifications_mac.h" 5 #include "chrome/browser/system_monitor/removable_device_notifications_mac.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 8
9 namespace chrome { 9 namespace chrome {
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 base::SystemMonitor::Get()->ProcessRemovableStorageDetached( 105 base::SystemMonitor::Get()->ProcessRemovableStorageDetached(
106 it->second.device_id()); 106 it->second.device_id());
107 } 107 }
108 } 108 }
109 109
110 if (update_type == UPDATE_DEVICE_REMOVED) { 110 if (update_type == UPDATE_DEVICE_REMOVED) {
111 if (it != disk_info_map_.end()) 111 if (it != disk_info_map_.end())
112 disk_info_map_.erase(it); 112 disk_info_map_.erase(it);
113 } else { 113 } else {
114 disk_info_map_[info.bsd_name()] = info; 114 disk_info_map_[info.bsd_name()] = info;
115 MediaStorageUtil::RecordDeviceInfoHistogram(false, info.device_id(),
vandebo (ex-Chrome) 2012/09/17 18:40:07 true, right?
kmadhusu 2012/09/17 19:32:49 Fixed.
116 info.display_name());
115 if (ShouldPostNotificationForDisk(info)) { 117 if (ShouldPostNotificationForDisk(info)) {
116 base::SystemMonitor::Get()->ProcessRemovableStorageAttached( 118 base::SystemMonitor::Get()->ProcessRemovableStorageAttached(
117 info.device_id(), info.display_name(), info.mount_point().value()); 119 info.device_id(), info.display_name(), info.mount_point().value());
118 } 120 }
119 } 121 }
120 } 122 }
121 123
122 bool RemovableDeviceNotificationsMac::GetDeviceInfoForPath( 124 bool RemovableDeviceNotificationsMac::GetDeviceInfoForPath(
123 const FilePath& path, 125 const FilePath& path,
124 base::SystemMonitor::RemovableStorageInfo* device_info) const { 126 base::SystemMonitor::RemovableStorageInfo* device_info) const {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 it = disk_info_map_.begin(); it != disk_info_map_.end(); ++it) { 196 it = disk_info_map_.begin(); it != disk_info_map_.end(); ++it) {
195 if (it->second.mount_point() == mount_point) { 197 if (it->second.mount_point() == mount_point) {
196 *info = it->second; 198 *info = it->second;
197 return true; 199 return true;
198 } 200 }
199 } 201 }
200 return false; 202 return false;
201 } 203 }
202 204
203 } // namespace chrome 205 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698