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

Unified Diff: chrome/browser/permissions/permission_request_impl.cc

Issue 2385063005: Make PermissionRequest::GetIconId return different types (Closed)
Patch Set: git cl try Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/permissions/permission_request_impl.cc
diff --git a/chrome/browser/permissions/permission_request_impl.cc b/chrome/browser/permissions/permission_request_impl.cc
index 94e8b54c13873f870b93da37fc987293dd7da90b..05115ab893fcb82d16c3ae65d429383ee0b6798f 100644
--- a/chrome/browser/permissions/permission_request_impl.cc
+++ b/chrome/browser/permissions/permission_request_impl.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/permissions/permission_uma_util.h"
#include "chrome/browser/permissions/permission_util.h"
#include "chrome/grit/generated_resources.h"
-#include "chrome/grit/theme_resources.h"
#include "components/url_formatter/elide_url.h"
#include "net/base/escape.h"
#include "ui/base/l10n/l10n_util.h"
@@ -42,10 +41,7 @@ PermissionRequestImpl::~PermissionRequestImpl() {
}
}
-gfx::VectorIconId PermissionRequestImpl::GetVectorIconId() const {
-#if defined(OS_ANDROID)
- return gfx::VectorIconId::VECTOR_ICON_NONE;
-#else
+PermissionRequest::IconId PermissionRequestImpl::GetIconId() const {
switch (permission_type_) {
case content::PermissionType::GEOLOCATION:
return gfx::VectorIconId::LOCATION_ON;
@@ -67,25 +63,8 @@ gfx::VectorIconId PermissionRequestImpl::GetVectorIconId() const {
NOTREACHED();
return gfx::VectorIconId::VECTOR_ICON_NONE;
}
-#endif
}
-#if defined(OS_ANDROID)
-int PermissionRequestImpl::GetIconId() const {
Peter Kasting 2016/10/06 07:10:30 I guess if this used to be reachable, then the new
Evan Stade 2016/10/06 15:33:50 I noticed this file shouldn't even be compiled on
- switch (permission_type_) {
- case content::PermissionType::GEOLOCATION:
- return IDR_ANDROID_INFOBAR_GEOLOCATION;
- case content::PermissionType::MIDI_SYSEX:
- return IDR_ALLOWED_MIDI_SYSEX;
- case content::PermissionType::FLASH:
- return IDR_ALLOWED_PLUGINS;
- default:
- NOTREACHED();
- return 0;
- }
-}
-#endif
-
base::string16 PermissionRequestImpl::GetMessageTextFragment() const {
int message_id;
switch (permission_type_) {

Powered by Google App Engine
This is Rietveld 408576698