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

Unified Diff: extensions/browser/api/system_display/system_display_api.cc

Issue 2862223003: Allow autotest extension to access system.display (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/system_display/system_display_api.cc
diff --git a/extensions/browser/api/system_display/system_display_api.cc b/extensions/browser/api/system_display/system_display_api.cc
index 66198acabcb305dbdd68c3739c31858c22635a4e..373262196dde93d4f658b6c3dcc45947218df486 100644
--- a/extensions/browser/api/system_display/system_display_api.cc
+++ b/extensions/browser/api/system_display/system_display_api.cc
@@ -16,6 +16,7 @@
#include "content/public/browser/web_contents_observer.h"
#include "extensions/browser/api/system_display/display_info_provider.h"
#include "extensions/common/api/system_display.h"
+#include "extensions/common/permissions/permissions_data.h"
#if defined(OS_CHROMEOS)
#include "extensions/common/manifest_handlers/kiosk_mode_info.h"
@@ -175,6 +176,11 @@ bool SystemDisplayFunction::PreRunValidation(std::string* error) {
}
bool SystemDisplayFunction::ShouldRestrictToKioskAndWebUI() {
+ // Allow autotest extension to access for Chrome OS testing.
+ if (extension()->permissions_data()->HasAPIPermission(
stevenjb 2017/05/10 16:15:08 Ugh, I should have noticed that this needs to be i
+ APIPermission::kAutoTestPrivate)) {
+ return false;
+ }
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698