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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context.cc

Issue 1153873003: Add way for PermissionContext to be automatically restricted to secure origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@midi_permission_sysex
Patch Set: typo Created 5 years, 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/geolocation/geolocation_permission_context.h" 5 #include "chrome/browser/geolocation/geolocation_permission_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "components/content_settings/core/common/permission_request_id.h" 10 #include "components/content_settings/core/common/permission_request_id.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 id.render_view_id()); 74 id.render_view_id());
75 if (content_settings) 75 if (content_settings)
76 content_settings->OnGeolocationPermissionSet( 76 content_settings->OnGeolocationPermissionSet(
77 requesting_frame.GetOrigin(), allowed); 77 requesting_frame.GetOrigin(), allowed);
78 78
79 if (allowed) { 79 if (allowed) {
80 content::GeolocationProvider::GetInstance() 80 content::GeolocationProvider::GetInstance()
81 ->UserDidOptIntoLocationServices(); 81 ->UserDidOptIntoLocationServices();
82 } 82 }
83 } 83 }
84
85 bool GeolocationPermissionContext::IsRestrictedToSecureOrigins() const {
86 return false;
87 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_permission_context.h ('k') | chrome/browser/media/midi_permission_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698