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

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: Rebase Created 5 years, 1 month 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 | « chrome/browser/permissions/permission_util.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/logging.h"
8
9 // The returned strings must match the RAPPOR metrics in rappor.xml,
10 // and any Field Trial configs for the Permissions kill switch e.g.
11 // Permissions.Action.Geolocation etc..
12 std::string PermissionUtil::GetPermissionString(
13 ContentSettingsType permission) {
14 switch (permission) {
15 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
16 return "Geolocation";
17 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
18 return "Notifications";
19 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX:
20 return "MidiSysEx";
21 case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING:
22 return "PushMessaging";
23 case CONTENT_SETTINGS_TYPE_DURABLE_STORAGE:
24 return "DurableStorage";
25 #if defined(OS_ANDROID) || defined(OS_CHROMEOS)
26 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER:
27 return "ProtectedMediaIdentifier";
28 #endif
29 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC:
30 return "AudioCapture";
31 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA:
32 return "VideoCapture";
33 default:
34 NOTREACHED();
35 return std::string();
36 }
37 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_util.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698