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

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

Issue 10836088: Make the manifest_ member of Extension into a scoped_ptr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | 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) 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 #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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 return required_permission_set_.get(); 655 return required_permission_set_.get();
656 } 656 }
657 // Appends |new_warnings| to install_warnings(). 657 // Appends |new_warnings| to install_warnings().
658 void AddInstallWarnings(const InstallWarningVector& new_warnings); 658 void AddInstallWarnings(const InstallWarningVector& new_warnings);
659 const InstallWarningVector& install_warnings() const { 659 const InstallWarningVector& install_warnings() const {
660 return install_warnings_; 660 return install_warnings_;
661 } 661 }
662 const GURL& update_url() const { return update_url_; } 662 const GURL& update_url() const { return update_url_; }
663 const ExtensionIconSet& icons() const { return icons_; } 663 const ExtensionIconSet& icons() const { return icons_; }
664 const extensions::Manifest* manifest() const { 664 const extensions::Manifest* manifest() const {
665 return manifest_; 665 return manifest_.get();
666 } 666 }
667 const std::string default_locale() const { return default_locale_; } 667 const std::string default_locale() const { return default_locale_; }
668 const URLOverrideMap& GetChromeURLOverrides() const { 668 const URLOverrideMap& GetChromeURLOverrides() const {
669 return chrome_url_overrides_; 669 return chrome_url_overrides_;
670 } 670 }
671 const std::string omnibox_keyword() const { return omnibox_keyword_; } 671 const std::string omnibox_keyword() const { return omnibox_keyword_; }
672 bool incognito_split_mode() const { return incognito_split_mode_; } 672 bool incognito_split_mode() const { return incognito_split_mode_; }
673 bool offline_enabled() const { return offline_enabled_; } 673 bool offline_enabled() const { return offline_enabled_; }
674 const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; } 674 const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; }
675 const OAuth2Info& oauth2_info() const { return oauth2_info_; } 675 const OAuth2Info& oauth2_info() const { return oauth2_info_; }
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 scoped_ptr<base::DictionaryValue> theme_display_properties_; 1061 scoped_ptr<base::DictionaryValue> theme_display_properties_;
1062 1062
1063 // The homepage for this extension. Useful if it is not hosted by Google and 1063 // The homepage for this extension. Useful if it is not hosted by Google and
1064 // therefore does not have a Gallery URL. 1064 // therefore does not have a Gallery URL.
1065 GURL homepage_url_; 1065 GURL homepage_url_;
1066 1066
1067 // URL for fetching an update manifest 1067 // URL for fetching an update manifest
1068 GURL update_url_; 1068 GURL update_url_;
1069 1069
1070 // The manifest from which this extension was created. 1070 // The manifest from which this extension was created.
1071 // 1071 scoped_ptr<Manifest> manifest_;
1072 // NOTE: This is an owned pointer, but can't use scoped_ptr because that would
1073 // require manifest.h, which would in turn create a circulate dependency
1074 // between extension.h and manifest.h.
1075 //
1076 // TODO(aa): Pull Extension::Type and Extension::Location out into their own
1077 // files so that manifest.h can rely on them and not get all of extension.h
1078 // too, and then change this back to a scoped_ptr.
1079 extensions::Manifest* manifest_;
1080 1072
1081 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs 1073 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs
1082 // which override the handling of those URLs. (see ExtensionOverrideUI). 1074 // which override the handling of those URLs. (see ExtensionOverrideUI).
1083 URLOverrideMap chrome_url_overrides_; 1075 URLOverrideMap chrome_url_overrides_;
1084 1076
1085 // Whether this extension requests isolated storage. 1077 // Whether this extension requests isolated storage.
1086 bool is_storage_isolated_; 1078 bool is_storage_isolated_;
1087 1079
1088 // The local path inside the extension to use with the launcher. 1080 // The local path inside the extension to use with the launcher.
1089 std::string launch_local_path_; 1081 std::string launch_local_path_;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 1183
1192 UpdatedExtensionPermissionsInfo( 1184 UpdatedExtensionPermissionsInfo(
1193 const Extension* extension, 1185 const Extension* extension,
1194 const PermissionSet* permissions, 1186 const PermissionSet* permissions,
1195 Reason reason); 1187 Reason reason);
1196 }; 1188 };
1197 1189
1198 } // namespace extensions 1190 } // namespace extensions
1199 1191
1200 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1192 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698