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

Side by Side Diff: extensions/common/extension.cc

Issue 315573003: Remove PermissionsData::ForExtension() completely (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « extensions/browser/api/usb/usb_api.cc ('k') | extensions/common/extension_messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "extensions/common/extension.h" 5 #include "extensions/common/extension.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return true; 281 return true;
282 } 282 }
283 283
284 // static 284 // static
285 GURL Extension::GetBaseURLFromExtensionId(const std::string& extension_id) { 285 GURL Extension::GetBaseURLFromExtensionId(const std::string& extension_id) {
286 return GURL(std::string(extensions::kExtensionScheme) + 286 return GURL(std::string(extensions::kExtensionScheme) +
287 url::kStandardSchemeSeparator + extension_id + "/"); 287 url::kStandardSchemeSeparator + extension_id + "/");
288 } 288 }
289 289
290 bool Extension::HasAPIPermission(APIPermission::ID permission) const { 290 bool Extension::HasAPIPermission(APIPermission::ID permission) const {
291 return PermissionsData::ForExtension(this)->HasAPIPermission(permission); 291 return permissions_data_->HasAPIPermission(permission);
292 } 292 }
293 293
294 bool Extension::HasAPIPermission(const std::string& permission_name) const { 294 bool Extension::HasAPIPermission(const std::string& permission_name) const {
295 return PermissionsData::ForExtension(this)->HasAPIPermission(permission_name); 295 return permissions_data_->HasAPIPermission(permission_name);
296 } 296 }
297 297
298 scoped_refptr<const PermissionSet> Extension::GetActivePermissions() const { 298 scoped_refptr<const PermissionSet> Extension::GetActivePermissions() const {
299 return PermissionsData::ForExtension(this)->active_permissions(); 299 return permissions_data_->active_permissions();
300 } 300 }
301 301
302 bool Extension::ShowConfigureContextMenus() const { 302 bool Extension::ShowConfigureContextMenus() const {
303 // Don't show context menu for component extensions. We might want to show 303 // Don't show context menu for component extensions. We might want to show
304 // options for component extension button but now there is no component 304 // options for component extension button but now there is no component
305 // extension with options. All other menu items like uninstall have 305 // extension with options. All other menu items like uninstall have
306 // no sense for component extensions. 306 // no sense for component extensions.
307 return location() != Manifest::COMPONENT && 307 return location() != Manifest::COMPONENT &&
308 location() != Manifest::EXTERNAL_COMPONENT; 308 location() != Manifest::EXTERNAL_COMPONENT;
309 } 309 }
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 788
789 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 789 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
790 const Extension* extension, 790 const Extension* extension,
791 const PermissionSet* permissions, 791 const PermissionSet* permissions,
792 Reason reason) 792 Reason reason)
793 : reason(reason), 793 : reason(reason),
794 extension(extension), 794 extension(extension),
795 permissions(permissions) {} 795 permissions(permissions) {}
796 796
797 } // namespace extensions 797 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/usb/usb_api.cc ('k') | extensions/common/extension_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698