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

Side by Side Diff: chrome/browser/permissions/permission_context_uma_util.cc

Issue 1382783002: Store USB device permissions in website settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove UsbPermissionContext and add ChooserPermissionContext helper functions. Created 5 years, 2 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
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 "chrome/browser/permissions/permission_context_uma_util.h" 5 #include "chrome/browser/permissions/permission_context_uma_util.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/permissions/permission_manager.h" 10 #include "chrome/browser/permissions/permission_manager.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 case PermissionType::PROTECTED_MEDIA_IDENTIFIER: 202 case PermissionType::PROTECTED_MEDIA_IDENTIFIER:
203 return "ProtectedMediaIdentifier"; 203 return "ProtectedMediaIdentifier";
204 case PermissionType::DURABLE_STORAGE: 204 case PermissionType::DURABLE_STORAGE:
205 return "DurableStorage"; 205 return "DurableStorage";
206 case PermissionType::MIDI: 206 case PermissionType::MIDI:
207 return "Midi"; 207 return "Midi";
208 case PermissionType::AUDIO_CAPTURE: 208 case PermissionType::AUDIO_CAPTURE:
209 return "AudioRecording"; 209 return "AudioRecording";
210 case PermissionType::VIDEO_CAPTURE: 210 case PermissionType::VIDEO_CAPTURE:
211 return "VideoRecording"; 211 return "VideoRecording";
212 case PermissionType::USB:
213 return "Usb";
212 case PermissionType::NUM: 214 case PermissionType::NUM:
213 break; 215 break;
214 } 216 }
215 NOTREACHED(); 217 NOTREACHED();
216 return std::string(); 218 return std::string();
217 } 219 }
218 220
219 void RecordPermissionRequest(ContentSettingsType permission, 221 void RecordPermissionRequest(ContentSettingsType permission,
220 const GURL& requesting_origin, 222 const GURL& requesting_origin,
221 const GURL& embedding_origin, 223 const GURL& embedding_origin,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 323
322 void PermissionContextUmaUtil::PermissionDismissed( 324 void PermissionContextUmaUtil::PermissionDismissed(
323 ContentSettingsType permission, const GURL& requesting_origin) { 325 ContentSettingsType permission, const GURL& requesting_origin) {
324 RecordPermissionAction(permission, DISMISSED, requesting_origin); 326 RecordPermissionAction(permission, DISMISSED, requesting_origin);
325 } 327 }
326 328
327 void PermissionContextUmaUtil::PermissionIgnored( 329 void PermissionContextUmaUtil::PermissionIgnored(
328 ContentSettingsType permission, const GURL& requesting_origin) { 330 ContentSettingsType permission, const GURL& requesting_origin) {
329 RecordPermissionAction(permission, IGNORED, requesting_origin); 331 RecordPermissionAction(permission, IGNORED, requesting_origin);
330 } 332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698