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

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

Issue 184043024: Limit scope of settings API configuration and proxy permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Bernhard's comments Created 6 years, 9 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
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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 bool Extension::is_extension() const { 444 bool Extension::is_extension() const {
445 return manifest()->is_extension(); 445 return manifest()->is_extension();
446 } 446 }
447 447
448 bool Extension::can_be_incognito_enabled() const { 448 bool Extension::can_be_incognito_enabled() const {
449 // Only component platform apps are supported in incognito. 449 // Only component platform apps are supported in incognito.
450 return !is_platform_app() || location() == Manifest::COMPONENT; 450 return !is_platform_app() || location() == Manifest::COMPONENT;
451 } 451 }
452 452
453 bool Extension::force_incognito_enabled() const {
454 return PermissionsData::HasAPIPermission(this, APIPermission::kProxy);
455 }
456
457 void Extension::AddWebExtentPattern(const URLPattern& pattern) { 453 void Extension::AddWebExtentPattern(const URLPattern& pattern) {
458 // Bookmark apps are permissionless. 454 // Bookmark apps are permissionless.
459 if (from_bookmark()) 455 if (from_bookmark())
460 return; 456 return;
461 457
462 extent_.AddPattern(pattern); 458 extent_.AddPattern(pattern);
463 } 459 }
464 460
465 bool Extension::is_theme() const { 461 bool Extension::is_theme() const {
466 return manifest()->is_theme(); 462 return manifest()->is_theme();
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 786
791 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 787 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
792 const Extension* extension, 788 const Extension* extension,
793 const PermissionSet* permissions, 789 const PermissionSet* permissions,
794 Reason reason) 790 Reason reason)
795 : reason(reason), 791 : reason(reason),
796 extension(extension), 792 extension(extension),
797 permissions(permissions) {} 793 permissions(permissions) {}
798 794
799 } // namespace extensions 795 } // namespace extensions
OLDNEW
« extensions/browser/extension_pref_value_map.cc ('K') | « extensions/common/extension.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698