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

Side by Side Diff: chrome/common/extensions/extension.h

Issue 12886023: Remove SandboxedPages and SandboxedCSP from Extension Class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « chrome/common/extensions/csp_handler.cc ('k') | chrome/common/extensions/extension.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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 static GURL GetResourceURL(const GURL& extension_url, 207 static GURL GetResourceURL(const GURL& extension_url,
208 const std::string& relative_path); 208 const std::string& relative_path);
209 GURL GetResourceURL(const std::string& relative_path) const { 209 GURL GetResourceURL(const std::string& relative_path) const {
210 return GetResourceURL(url(), relative_path); 210 return GetResourceURL(url(), relative_path);
211 } 211 }
212 212
213 // Returns true if the resource matches a pattern in the pattern_set. 213 // Returns true if the resource matches a pattern in the pattern_set.
214 bool ResourceMatches(const URLPatternSet& pattern_set, 214 bool ResourceMatches(const URLPatternSet& pattern_set,
215 const std::string& resource) const; 215 const std::string& resource) const;
216 216
217 // Returns true if the specified page is sandboxed (served in a unique
218 // origin).
219 bool IsSandboxedPage(const std::string& relative_path) const;
220
221 // Returns the Content Security Policy that the specified resource should be
222 // served with.
223 std::string GetResourceContentSecurityPolicy(const std::string& relative_path)
224 const;
225
226 // Returns an extension resource object. |relative_path| should be UTF8 217 // Returns an extension resource object. |relative_path| should be UTF8
227 // encoded. 218 // encoded.
228 ExtensionResource GetResource(const std::string& relative_path) const; 219 ExtensionResource GetResource(const std::string& relative_path) const;
229 220
230 // As above, but with |relative_path| following the file system's encoding. 221 // As above, but with |relative_path| following the file system's encoding.
231 ExtensionResource GetResource(const base::FilePath& relative_path) const; 222 ExtensionResource GetResource(const base::FilePath& relative_path) const;
232 223
233 // |input| is expected to be the text of an rsa public or private key. It 224 // |input| is expected to be the text of an rsa public or private key. It
234 // tolerates the presence or absence of bracking header/footer like this: 225 // tolerates the presence or absence of bracking header/footer like this:
235 // -----(BEGIN|END) [RSA PUBLIC/PRIVATE] KEY----- 226 // -----(BEGIN|END) [RSA PUBLIC/PRIVATE] KEY-----
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 const char* list_error, 541 const char* list_error,
551 const char* value_error, 542 const char* value_error,
552 string16* error); 543 string16* error);
553 bool LoadLaunchContainer(string16* error); 544 bool LoadLaunchContainer(string16* error);
554 bool LoadLaunchURL(string16* error); 545 bool LoadLaunchURL(string16* error);
555 546
556 bool LoadSharedFeatures(string16* error); 547 bool LoadSharedFeatures(string16* error);
557 bool LoadDescription(string16* error); 548 bool LoadDescription(string16* error);
558 bool LoadManifestVersion(string16* error); 549 bool LoadManifestVersion(string16* error);
559 bool LoadNaClModules(string16* error); 550 bool LoadNaClModules(string16* error);
560 bool LoadSandboxedPages(string16* error);
561 bool LoadKioskEnabled(string16* error); 551 bool LoadKioskEnabled(string16* error);
562 bool LoadOfflineEnabled(string16* error); 552 bool LoadOfflineEnabled(string16* error);
563 bool LoadTextToSpeechVoices(string16* error); 553 bool LoadTextToSpeechVoices(string16* error);
564 bool LoadManagedModeFeatures(string16* error); 554 bool LoadManagedModeFeatures(string16* error);
565 bool LoadManagedModeSites( 555 bool LoadManagedModeSites(
566 const base::DictionaryValue* content_pack_value, 556 const base::DictionaryValue* content_pack_value,
567 string16* error); 557 string16* error);
568 bool LoadManagedModeConfigurations( 558 bool LoadManagedModeConfigurations(
569 const base::DictionaryValue* content_pack_value, 559 const base::DictionaryValue* content_pack_value,
570 string16* error); 560 string16* error);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 // An optional longer description of the extension. 640 // An optional longer description of the extension.
651 std::string description_; 641 std::string description_;
652 642
653 // True if the extension was generated from a user script. (We show slightly 643 // True if the extension was generated from a user script. (We show slightly
654 // different UI if so). 644 // different UI if so).
655 bool converted_from_user_script_; 645 bool converted_from_user_script_;
656 646
657 // Optional list of NaCl modules and associated properties. 647 // Optional list of NaCl modules and associated properties.
658 std::vector<NaClModuleInfo> nacl_modules_; 648 std::vector<NaClModuleInfo> nacl_modules_;
659 649
660 // Optional list of extension pages that are sandboxed (served from a unique
661 // origin with a different Content Security Policy).
662 URLPatternSet sandboxed_pages_;
663
664 // Content Security Policy that should be used to enforce the sandbox used
665 // by sandboxed pages (guaranteed to have the "sandbox" directive without the
666 // "allow-same-origin" token).
667 std::string sandboxed_pages_content_security_policy_;
668
669 // The public key used to sign the contents of the crx package. 650 // The public key used to sign the contents of the crx package.
670 std::string public_key_; 651 std::string public_key_;
671 652
672 // A file containing a list of sites for Managed Mode. 653 // A file containing a list of sites for Managed Mode.
673 base::FilePath content_pack_site_list_; 654 base::FilePath content_pack_site_list_;
674 655
675 // The manifest from which this extension was created. 656 // The manifest from which this extension was created.
676 scoped_ptr<Manifest> manifest_; 657 scoped_ptr<Manifest> manifest_;
677 658
678 // Stored parsed manifest data. 659 // Stored parsed manifest data.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 760
780 UpdatedExtensionPermissionsInfo( 761 UpdatedExtensionPermissionsInfo(
781 const Extension* extension, 762 const Extension* extension,
782 const PermissionSet* permissions, 763 const PermissionSet* permissions,
783 Reason reason); 764 Reason reason);
784 }; 765 };
785 766
786 } // namespace extensions 767 } // namespace extensions
787 768
788 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 769 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/csp_handler.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698