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

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

Issue 10675007: Move each permission classes to its own files in extensions/permissions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase again Created 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chrome_geolocation_permission_context.h" 5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
6 6
7 #include <functional> 7 #include <functional>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 606
607 ExtensionService* extension_service = profile_->GetExtensionService(); 607 ExtensionService* extension_service = profile_->GetExtensionService();
608 if (extension_service) { 608 if (extension_service) {
609 const extensions::Extension* extension = 609 const extensions::Extension* extension =
610 extension_service->extensions()->GetExtensionOrAppByURL( 610 extension_service->extensions()->GetExtensionOrAppByURL(
611 ExtensionURLInfo( 611 ExtensionURLInfo(
612 WebSecurityOrigin::createFromString( 612 WebSecurityOrigin::createFromString(
613 UTF8ToUTF16(requesting_frame.spec())), 613 UTF8ToUTF16(requesting_frame.spec())),
614 requesting_frame)); 614 requesting_frame));
615 if (extension && 615 if (extension &&
616 extension->HasAPIPermission(ExtensionAPIPermission::kGeolocation)) { 616 extension->HasAPIPermission(extensions::APIPermission::kGeolocation)) {
617 // Make sure the extension is in the calling process. 617 // Make sure the extension is in the calling process.
618 if (extension_service->process_map()->Contains( 618 if (extension_service->process_map()->Contains(
619 extension->id(), render_process_id)) { 619 extension->id(), render_process_id)) {
620 NotifyPermissionSet(render_process_id, render_view_id, bridge_id, 620 NotifyPermissionSet(render_process_id, render_view_id, bridge_id,
621 requesting_frame, callback, true); 621 requesting_frame, callback, true);
622 return; 622 return;
623 } 623 }
624 } 624 }
625 } 625 }
626 626
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 BrowserThread::UI, FROM_HERE, 705 BrowserThread::UI, FROM_HERE,
706 base::Bind( 706 base::Bind(
707 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, 707 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest,
708 this, render_process_id, render_view_id, bridge_id)); 708 this, render_process_id, render_view_id, bridge_id));
709 return; 709 return;
710 } 710 }
711 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 711 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
712 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, 712 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id,
713 render_view_id, bridge_id); 713 render_view_id, bridge_id);
714 } 714 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/settings/settings_frontend.cc ('k') | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698