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

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
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 static GURL GetResourceURL(const GURL& extension_url, 235 static GURL GetResourceURL(const GURL& extension_url,
236 const std::string& relative_path); 236 const std::string& relative_path);
237 GURL GetResourceURL(const std::string& relative_path) const { 237 GURL GetResourceURL(const std::string& relative_path) const {
238 return GetResourceURL(url(), relative_path); 238 return GetResourceURL(url(), relative_path);
239 } 239 }
240 240
241 // Returns true if the resource matches a pattern in the pattern_set. 241 // Returns true if the resource matches a pattern in the pattern_set.
242 bool ResourceMatches(const URLPatternSet& pattern_set, 242 bool ResourceMatches(const URLPatternSet& pattern_set,
243 const std::string& resource) const; 243 const std::string& resource) const;
244 244
245 // Returns true if the specified page is sandboxed (served in a unique
246 // origin).
247 bool IsSandboxedPage(const std::string& relative_path) const;
248
249 // Returns the Content Security Policy that the specified resource should be 245 // Returns the Content Security Policy that the specified resource should be
250 // served with. 246 // served with.
251 std::string GetResourceContentSecurityPolicy(const std::string& relative_path) 247 std::string GetResourceContentSecurityPolicy(const std::string& relative_path)
252 const; 248 const;
253 249
254 // Returns an extension resource object. |relative_path| should be UTF8 250 // Returns an extension resource object. |relative_path| should be UTF8
255 // encoded. 251 // encoded.
256 ExtensionResource GetResource(const std::string& relative_path) const; 252 ExtensionResource GetResource(const std::string& relative_path) const;
257 253
258 // As above, but with |relative_path| following the file system's encoding. 254 // As above, but with |relative_path| following the file system's encoding.
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 const char* list_error, 585 const char* list_error,
590 const char* value_error, 586 const char* value_error,
591 string16* error); 587 string16* error);
592 bool LoadLaunchContainer(string16* error); 588 bool LoadLaunchContainer(string16* error);
593 bool LoadLaunchURL(string16* error); 589 bool LoadLaunchURL(string16* error);
594 590
595 bool LoadSharedFeatures(string16* error); 591 bool LoadSharedFeatures(string16* error);
596 bool LoadDescription(string16* error); 592 bool LoadDescription(string16* error);
597 bool LoadManifestVersion(string16* error); 593 bool LoadManifestVersion(string16* error);
598 bool LoadNaClModules(string16* error); 594 bool LoadNaClModules(string16* error);
599 bool LoadSandboxedPages(string16* error);
600 // Must be called after the "plugins" key has been parsed. 595 // Must be called after the "plugins" key has been parsed.
601 bool LoadRequirements(string16* error); 596 bool LoadRequirements(string16* error);
602 bool LoadOfflineEnabled(string16* error); 597 bool LoadOfflineEnabled(string16* error);
603 bool LoadExtensionFeatures(string16* error); 598 bool LoadExtensionFeatures(string16* error);
604 bool LoadContentScripts(string16* error); 599 bool LoadContentScripts(string16* error);
605 bool LoadBrowserAction(string16* error); 600 bool LoadBrowserAction(string16* error);
606 bool LoadSystemIndicator(string16* error); 601 bool LoadSystemIndicator(string16* error);
607 bool LoadTextToSpeechVoices(string16* error); 602 bool LoadTextToSpeechVoices(string16* error);
608 bool LoadIncognitoMode(string16* error); 603 bool LoadIncognitoMode(string16* error);
609 bool LoadManagedModeFeatures(string16* error); 604 bool LoadManagedModeFeatures(string16* error);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 716
722 // Paths to the content scripts the extension contains. 717 // Paths to the content scripts the extension contains.
723 UserScriptList content_scripts_; 718 UserScriptList content_scripts_;
724 719
725 // The extension's system indicator, if any. 720 // The extension's system indicator, if any.
726 scoped_ptr<ActionInfo> system_indicator_info_; 721 scoped_ptr<ActionInfo> system_indicator_info_;
727 722
728 // Optional list of NaCl modules and associated properties. 723 // Optional list of NaCl modules and associated properties.
729 std::vector<NaClModuleInfo> nacl_modules_; 724 std::vector<NaClModuleInfo> nacl_modules_;
730 725
731 // Optional list of extension pages that are sandboxed (served from a unique
732 // origin with a different Content Security Policy).
733 URLPatternSet sandboxed_pages_;
734
735 // Content Security Policy that should be used to enforce the sandbox used
736 // by sandboxed pages (guaranteed to have the "sandbox" directive without the
737 // "allow-same-origin" token).
738 std::string sandboxed_pages_content_security_policy_;
739
740 // The public key used to sign the contents of the crx package. 726 // The public key used to sign the contents of the crx package.
741 std::string public_key_; 727 std::string public_key_;
742 728
743 // A file containing a list of sites for Managed Mode. 729 // A file containing a list of sites for Managed Mode.
744 base::FilePath content_pack_site_list_; 730 base::FilePath content_pack_site_list_;
745 731
746 // The manifest from which this extension was created. 732 // The manifest from which this extension was created.
747 scoped_ptr<Manifest> manifest_; 733 scoped_ptr<Manifest> manifest_;
748 734
749 // Stored parsed manifest data. 735 // Stored parsed manifest data.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 836
851 UpdatedExtensionPermissionsInfo( 837 UpdatedExtensionPermissionsInfo(
852 const Extension* extension, 838 const Extension* extension,
853 const PermissionSet* permissions, 839 const PermissionSet* permissions,
854 Reason reason); 840 Reason reason);
855 }; 841 };
856 842
857 } // namespace extensions 843 } // namespace extensions
858 844
859 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 845 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698