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

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

Issue 2145373002: Revert of Add hooks to permission layer for permission action reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-reporter-implementation
Patch Set: 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_bubble_request_impl.h" 5 #include "chrome/browser/permissions/permission_bubble_request_impl.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/permissions/permission_context_base.h" 8 #include "chrome/browser/permissions/permission_context_base.h"
9 #include "chrome/browser/permissions/permission_uma_util.h" 9 #include "chrome/browser/permissions/permission_uma_util.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 11 matching lines...) Expand all
22 : request_origin_(request_origin), 22 : request_origin_(request_origin),
23 permission_type_(permission_type), 23 permission_type_(permission_type),
24 permission_decided_callback_(permission_decided_callback), 24 permission_decided_callback_(permission_decided_callback),
25 delete_callback_(delete_callback), 25 delete_callback_(delete_callback),
26 is_finished_(false), 26 is_finished_(false),
27 action_taken_(false) {} 27 action_taken_(false) {}
28 28
29 PermissionBubbleRequestImpl::~PermissionBubbleRequestImpl() { 29 PermissionBubbleRequestImpl::~PermissionBubbleRequestImpl() {
30 DCHECK(is_finished_); 30 DCHECK(is_finished_);
31 if (!action_taken_) 31 if (!action_taken_)
32 // TODO(stefanocs): Pass in a non null profile. 32 PermissionUmaUtil::PermissionIgnored(permission_type_, request_origin_);
33 PermissionUmaUtil::PermissionIgnored(permission_type_, request_origin_,
34 nullptr);
35 } 33 }
36 34
37 gfx::VectorIconId PermissionBubbleRequestImpl::GetVectorIconId() const { 35 gfx::VectorIconId PermissionBubbleRequestImpl::GetVectorIconId() const {
38 #if !defined(OS_MACOSX) 36 #if !defined(OS_MACOSX)
39 switch (permission_type_) { 37 switch (permission_type_) {
40 case content::PermissionType::GEOLOCATION: 38 case content::PermissionType::GEOLOCATION:
41 return gfx::VectorIconId::LOCATION_ON; 39 return gfx::VectorIconId::LOCATION_ON;
42 #if defined(ENABLE_NOTIFICATIONS) 40 #if defined(ENABLE_NOTIFICATIONS)
43 case content::PermissionType::NOTIFICATIONS: 41 case content::PermissionType::NOTIFICATIONS:
44 return gfx::VectorIconId::NOTIFICATIONS; 42 return gfx::VectorIconId::NOTIFICATIONS;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return PermissionBubbleType::PERMISSION_PUSH_MESSAGING; 147 return PermissionBubbleType::PERMISSION_PUSH_MESSAGING;
150 #if defined(OS_CHROMEOS) 148 #if defined(OS_CHROMEOS)
151 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: 149 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
152 return PermissionBubbleType::PERMISSION_PROTECTED_MEDIA_IDENTIFIER; 150 return PermissionBubbleType::PERMISSION_PROTECTED_MEDIA_IDENTIFIER;
153 #endif 151 #endif
154 default: 152 default:
155 NOTREACHED(); 153 NOTREACHED();
156 return PermissionBubbleType::UNKNOWN; 154 return PermissionBubbleType::UNKNOWN;
157 } 155 }
158 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.cc ('k') | chrome/browser/permissions/permission_context_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698