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

Unified Diff: blimp/engine/app/blimp_permission_manager.cc

Issue 2249283003: Hooks together Geolocation Feature in the Client and Engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lai
Patch Set: Put TestingLocationArbitrator out of anonymous namespace. Created 4 years, 3 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 | « blimp/engine/BUILD.gn ('k') | blimp/engine/feature/geolocation/engine_geolocation_feature.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/app/blimp_permission_manager.cc
diff --git a/blimp/engine/app/blimp_permission_manager.cc b/blimp/engine/app/blimp_permission_manager.cc
index 6f48b00325aa4ba6d5a8315d4b0ccc2ca6859eca..e41f957bcf9c4c2a551070bdd0b276b5082cff07 100644
--- a/blimp/engine/app/blimp_permission_manager.cc
+++ b/blimp/engine/app/blimp_permission_manager.cc
@@ -23,7 +23,13 @@ int BlimpPermissionManager::RequestPermission(
const GURL& origin,
bool user_gesture,
const base::Callback<void(blink::mojom::PermissionStatus)>& callback) {
- callback.Run(blink::mojom::PermissionStatus::DENIED);
+ if (permission == content::PermissionType::GEOLOCATION) {
+ VLOG(1) << "Geolocation permission granted.";
+ callback.Run(blink::mojom::PermissionStatus::GRANTED);
+ } else {
+ VLOG(1) << "Permission denied.";
+ callback.Run(blink::mojom::PermissionStatus::DENIED);
+ }
return kNoPendingOperation;
}
« no previous file with comments | « blimp/engine/BUILD.gn ('k') | blimp/engine/feature/geolocation/engine_geolocation_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698