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

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

Issue 2075523002: Add SourceUI field to permission report (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment + TODO Created 4 years, 5 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_base.h" 5 #include "chrome/browser/permissions/permission_context_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 bool persist, 210 bool persist,
211 ContentSetting content_setting) { 211 ContentSetting content_setting) {
212 #if !defined(OS_ANDROID) 212 #if !defined(OS_ANDROID)
213 // Infobar persistence and its related UMA is tracked on the infobar 213 // Infobar persistence and its related UMA is tracked on the infobar
214 // controller directly. 214 // controller directly.
215 if (persist) { 215 if (persist) {
216 DCHECK(content_setting == CONTENT_SETTING_ALLOW || 216 DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
217 content_setting == CONTENT_SETTING_BLOCK); 217 content_setting == CONTENT_SETTING_BLOCK);
218 if (content_setting == CONTENT_SETTING_ALLOW) 218 if (content_setting == CONTENT_SETTING_ALLOW)
219 PermissionUmaUtil::PermissionGranted(permission_type_, requesting_origin, 219 PermissionUmaUtil::PermissionGranted(permission_type_, requesting_origin,
220 profile_); 220 PROMPT, profile_);
raymes 2016/07/12 00:54:36 As discussed, I think in most cases we don't need
kcarattini 2016/07/12 01:01:42 I assume that we don't call it for anything but th
stefanocs 2016/07/12 04:33:33 Done.
221 else 221 else
222 PermissionUmaUtil::PermissionDenied(permission_type_, requesting_origin, 222 PermissionUmaUtil::PermissionDenied(permission_type_, requesting_origin,
223 profile_); 223 PROMPT, profile_);
224 } else { 224 } else {
225 DCHECK_EQ(content_setting, CONTENT_SETTING_DEFAULT); 225 DCHECK_EQ(content_setting, CONTENT_SETTING_DEFAULT);
226 PermissionUmaUtil::PermissionDismissed(permission_type_, requesting_origin, 226 PermissionUmaUtil::PermissionDismissed(permission_type_, requesting_origin,
227 profile_); 227 PROMPT, profile_);
228 } 228 }
229 #endif 229 #endif
230 230
231 NotifyPermissionSet(id, requesting_origin, embedding_origin, callback, 231 NotifyPermissionSet(id, requesting_origin, embedding_origin, callback,
232 persist, content_setting); 232 persist, content_setting);
233 } 233 }
234 234
235 #if defined(OS_ANDROID) 235 #if defined(OS_ANDROID)
236 PermissionQueueController* PermissionContextBase::GetQueueController() { 236 PermissionQueueController* PermissionContextBase::GetQueueController() {
237 return permission_queue_controller_.get(); 237 return permission_queue_controller_.get();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 content_setting); 287 content_setting);
288 } 288 }
289 289
290 bool PermissionContextBase::IsPermissionKillSwitchOn() const { 290 bool PermissionContextBase::IsPermissionKillSwitchOn() const {
291 const std::string param = variations::GetVariationParamValue( 291 const std::string param = variations::GetVariationParamValue(
292 kPermissionsKillSwitchFieldStudy, 292 kPermissionsKillSwitchFieldStudy,
293 PermissionUtil::GetPermissionString(permission_type_)); 293 PermissionUtil::GetPermissionString(permission_type_));
294 294
295 return param == kPermissionsKillSwitchBlockedValue; 295 return param == kPermissionsKillSwitchBlockedValue;
296 } 296 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698