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

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

Issue 12025010: Move default_locale out of Extension class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extension_service_unittest fixed Created 7 years, 10 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 // Appends |new_warning[s]| to install_warnings_. 636 // Appends |new_warning[s]| to install_warnings_.
637 void AddInstallWarning(const InstallWarning& new_warning); 637 void AddInstallWarning(const InstallWarning& new_warning);
638 void AddInstallWarnings(const InstallWarningVector& new_warnings); 638 void AddInstallWarnings(const InstallWarningVector& new_warnings);
639 const InstallWarningVector& install_warnings() const { 639 const InstallWarningVector& install_warnings() const {
640 return install_warnings_; 640 return install_warnings_;
641 } 641 }
642 const ExtensionIconSet& icons() const { return icons_; } 642 const ExtensionIconSet& icons() const { return icons_; }
643 const extensions::Manifest* manifest() const { 643 const extensions::Manifest* manifest() const {
644 return manifest_.get(); 644 return manifest_.get();
645 } 645 }
646 const std::string default_locale() const { return default_locale_; }
647 bool incognito_split_mode() const { return incognito_split_mode_; } 646 bool incognito_split_mode() const { return incognito_split_mode_; }
648 bool offline_enabled() const { return offline_enabled_; } 647 bool offline_enabled() const { return offline_enabled_; }
649 const OAuth2Info& oauth2_info() const { return oauth2_info_; } 648 const OAuth2Info& oauth2_info() const { return oauth2_info_; }
650 bool wants_file_access() const { return wants_file_access_; } 649 bool wants_file_access() const { return wants_file_access_; }
651 int creation_flags() const { return creation_flags_; } 650 int creation_flags() const { return creation_flags_; }
652 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } 651 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; }
653 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } 652 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; }
654 bool was_installed_by_default() const { 653 bool was_installed_by_default() const {
655 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; 654 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0;
656 } 655 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 bool LoadSharedFeatures(const APIPermissionSet& api_permissions, 777 bool LoadSharedFeatures(const APIPermissionSet& api_permissions,
779 string16* error); 778 string16* error);
780 bool LoadDescription(string16* error); 779 bool LoadDescription(string16* error);
781 bool LoadManifestVersion(string16* error); 780 bool LoadManifestVersion(string16* error);
782 bool LoadIcons(string16* error); 781 bool LoadIcons(string16* error);
783 bool LoadPlugins(string16* error); 782 bool LoadPlugins(string16* error);
784 bool LoadNaClModules(string16* error); 783 bool LoadNaClModules(string16* error);
785 bool LoadSandboxedPages(string16* error); 784 bool LoadSandboxedPages(string16* error);
786 // Must be called after LoadPlugins(). 785 // Must be called after LoadPlugins().
787 bool LoadRequirements(string16* error); 786 bool LoadRequirements(string16* error);
788 bool LoadDefaultLocale(string16* error);
789 bool LoadOfflineEnabled(string16* error); 787 bool LoadOfflineEnabled(string16* error);
790 bool LoadBackgroundScripts(string16* error); 788 bool LoadBackgroundScripts(string16* error);
791 bool LoadBackgroundScripts(const std::string& key, string16* error); 789 bool LoadBackgroundScripts(const std::string& key, string16* error);
792 bool LoadBackgroundPage(const APIPermissionSet& api_permissions, 790 bool LoadBackgroundPage(const APIPermissionSet& api_permissions,
793 string16* error); 791 string16* error);
794 bool LoadBackgroundPage(const std::string& key, 792 bool LoadBackgroundPage(const std::string& key,
795 const APIPermissionSet& api_permissions, 793 const APIPermissionSet& api_permissions,
796 string16* error); 794 string16* error);
797 bool LoadBackgroundPersistent( 795 bool LoadBackgroundPersistent(
798 const APIPermissionSet& api_permissions, 796 const APIPermissionSet& api_permissions,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 // this member variable to 0 to distinguish the "uninitialized" case from 897 // this member variable to 0 to distinguish the "uninitialized" case from
900 // the case when we know the manifest version actually is 1. 898 // the case when we know the manifest version actually is 1.
901 int manifest_version_; 899 int manifest_version_;
902 900
903 // The requirements declared in the manifest. 901 // The requirements declared in the manifest.
904 Requirements requirements_; 902 Requirements requirements_;
905 903
906 // The absolute path to the directory the extension is stored in. 904 // The absolute path to the directory the extension is stored in.
907 FilePath path_; 905 FilePath path_;
908 906
909 // Default locale for fall back. Can be empty if extension is not localized.
910 std::string default_locale_;
911
912 // If true, a separate process will be used for the extension in incognito 907 // If true, a separate process will be used for the extension in incognito
913 // mode. 908 // mode.
914 bool incognito_split_mode_; 909 bool incognito_split_mode_;
915 910
916 // Whether the extension or app should be enabled when offline. 911 // Whether the extension or app should be enabled when offline.
917 bool offline_enabled_; 912 bool offline_enabled_;
918 913
919 // Defines the set of URLs in the extension's web content. 914 // Defines the set of URLs in the extension's web content.
920 URLPatternSet extent_; 915 URLPatternSet extent_;
921 916
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 1124
1130 UpdatedExtensionPermissionsInfo( 1125 UpdatedExtensionPermissionsInfo(
1131 const Extension* extension, 1126 const Extension* extension,
1132 const PermissionSet* permissions, 1127 const PermissionSet* permissions,
1133 Reason reason); 1128 Reason reason);
1134 }; 1129 };
1135 1130
1136 } // namespace extensions 1131 } // namespace extensions
1137 1132
1138 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1133 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/i18n/default_locale_manifest_unittest.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698