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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 2 Created 8 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 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 base::Bind( 596 base::Bind(
597 &ChromeGeolocationPermissionContext::RequestGeolocationPermission, 597 &ChromeGeolocationPermissionContext::RequestGeolocationPermission,
598 this, render_process_id, render_view_id, bridge_id, 598 this, render_process_id, render_view_id, bridge_id,
599 requesting_frame, callback)); 599 requesting_frame, callback));
600 return; 600 return;
601 } 601 }
602 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 602 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
603 603
604 ExtensionService* extension_service = profile_->GetExtensionService(); 604 ExtensionService* extension_service = profile_->GetExtensionService();
605 if (extension_service) { 605 if (extension_service) {
606 const Extension* extension = 606 const extensions::Extension* extension =
607 extension_service->extensions()->GetExtensionOrAppByURL( 607 extension_service->extensions()->GetExtensionOrAppByURL(
608 ExtensionURLInfo( 608 ExtensionURLInfo(
609 WebSecurityOrigin::createFromString( 609 WebSecurityOrigin::createFromString(
610 UTF8ToUTF16(requesting_frame.spec())), 610 UTF8ToUTF16(requesting_frame.spec())),
611 requesting_frame)); 611 requesting_frame));
612 if (extension && 612 if (extension &&
613 extension->HasAPIPermission(ExtensionAPIPermission::kGeolocation)) { 613 extension->HasAPIPermission(ExtensionAPIPermission::kGeolocation)) {
614 // Make sure the extension is in the calling process. 614 // Make sure the extension is in the calling process.
615 if (extension_service->process_map()->Contains( 615 if (extension_service->process_map()->Contains(
616 extension->id(), render_process_id)) { 616 extension->id(), render_process_id)) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 BrowserThread::UI, FROM_HERE, 703 BrowserThread::UI, FROM_HERE,
704 base::Bind( 704 base::Bind(
705 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, 705 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest,
706 this, render_process_id, render_view_id, bridge_id)); 706 this, render_process_id, render_view_id, bridge_id));
707 return; 707 return;
708 } 708 }
709 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 709 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
710 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, 710 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id,
711 render_view_id, bridge_id); 711 render_view_id, bridge_id);
712 } 712 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698