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

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 6 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 base::Bind( 597 base::Bind(
598 &ChromeGeolocationPermissionContext::RequestGeolocationPermission, 598 &ChromeGeolocationPermissionContext::RequestGeolocationPermission,
599 this, render_process_id, render_view_id, bridge_id, 599 this, render_process_id, render_view_id, bridge_id,
600 requesting_frame, callback)); 600 requesting_frame, callback));
601 return; 601 return;
602 } 602 }
603 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 603 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
604 604
605 ExtensionService* extension_service = profile_->GetExtensionService(); 605 ExtensionService* extension_service = profile_->GetExtensionService();
606 if (extension_service) { 606 if (extension_service) {
607 const Extension* extension = 607 const extensions::Extension* extension =
608 extension_service->extensions()->GetExtensionOrAppByURL( 608 extension_service->extensions()->GetExtensionOrAppByURL(
609 ExtensionURLInfo( 609 ExtensionURLInfo(
610 WebSecurityOrigin::createFromString( 610 WebSecurityOrigin::createFromString(
611 UTF8ToUTF16(requesting_frame.spec())), 611 UTF8ToUTF16(requesting_frame.spec())),
612 requesting_frame)); 612 requesting_frame));
613 if (extension && 613 if (extension &&
614 extension->HasAPIPermission(ExtensionAPIPermission::kGeolocation)) { 614 extension->HasAPIPermission(ExtensionAPIPermission::kGeolocation)) {
615 // Make sure the extension is in the calling process. 615 // Make sure the extension is in the calling process.
616 if (extension_service->process_map()->Contains( 616 if (extension_service->process_map()->Contains(
617 extension->id(), render_process_id)) { 617 extension->id(), render_process_id)) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 BrowserThread::UI, FROM_HERE, 704 BrowserThread::UI, FROM_HERE,
705 base::Bind( 705 base::Bind(
706 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, 706 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest,
707 this, render_process_id, render_view_id, bridge_id)); 707 this, render_process_id, render_view_id, bridge_id));
708 return; 708 return;
709 } 709 }
710 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 710 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
711 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, 711 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id,
712 render_view_id, bridge_id); 712 render_view_id, bridge_id);
713 } 713 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/browser/history/multipart_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698