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

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

Issue 1388343003: Adds a field trial to control Web API kill switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Comments 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/permissions/permission_util.h"
6
7 // The returned strings must match the RAPPOR metrics in rappor.xml,
8 // and any Finch configs for the Permissions kill switch e.g.
9 // Permissions.Action.Geolocation etc..
mlamouri (slow - plz ping) 2015/10/21 11:26:06 nit: it shouldn't match RAPPOR and Finch but the o
kcarattini 2015/10/26 00:30:59 The comment was meant for people editing the code
10 const std::string PermissionUtil::GetPermissionString(
11 ContentSettingsType permission) {
12 switch (permission) {
13 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
14 return "Geolocation";
15 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
16 return "Notifications";
17 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX:
18 return "MidiSysEx";
19 case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING:
20 return "PushMessaging";
21 case CONTENT_SETTINGS_TYPE_DURABLE_STORAGE:
22 return "DurableStorage";
23 #if defined(OS_ANDROID) || defined(OS_CHROMEOS)
24 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER:
25 return "ProtectedMediaIdentifier";
26 #endif
27 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC:
28 return "AudioCapture";
29 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA:
30 return "VideoCapture";
31 default:
32 NOTREACHED();
33 return "";
Bernhard Bauer 2015/10/21 10:29:04 Use an empty std::string() constructor to save a c
kcarattini 2015/10/26 00:30:59 Done.
34 }
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698