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

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: patch updated Created 7 years, 11 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // Appends |new_warning[s]| to install_warnings_. 665 // Appends |new_warning[s]| to install_warnings_.
666 void AddInstallWarning(const InstallWarning& new_warning); 666 void AddInstallWarning(const InstallWarning& new_warning);
667 void AddInstallWarnings(const InstallWarningVector& new_warnings); 667 void AddInstallWarnings(const InstallWarningVector& new_warnings);
668 const InstallWarningVector& install_warnings() const { 668 const InstallWarningVector& install_warnings() const {
669 return install_warnings_; 669 return install_warnings_;
670 } 670 }
671 const ExtensionIconSet& icons() const { return icons_; } 671 const ExtensionIconSet& icons() const { return icons_; }
672 const extensions::Manifest* manifest() const { 672 const extensions::Manifest* manifest() const {
673 return manifest_.get(); 673 return manifest_.get();
674 } 674 }
675 const std::string default_locale() const { return default_locale_; }
676 bool incognito_split_mode() const { return incognito_split_mode_; } 675 bool incognito_split_mode() const { return incognito_split_mode_; }
677 bool offline_enabled() const { return offline_enabled_; } 676 bool offline_enabled() const { return offline_enabled_; }
678 const OAuth2Info& oauth2_info() const { return oauth2_info_; } 677 const OAuth2Info& oauth2_info() const { return oauth2_info_; }
679 bool wants_file_access() const { return wants_file_access_; } 678 bool wants_file_access() const { return wants_file_access_; }
680 int creation_flags() const { return creation_flags_; } 679 int creation_flags() const { return creation_flags_; }
681 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } 680 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; }
682 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } 681 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; }
683 bool was_installed_by_default() const { 682 bool was_installed_by_default() const {
684 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; 683 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0;
685 } 684 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 string16* error); 806 string16* error);
808 bool LoadDescription(string16* error); 807 bool LoadDescription(string16* error);
809 bool LoadManifestVersion(string16* error); 808 bool LoadManifestVersion(string16* error);
810 bool LoadIcons(string16* error); 809 bool LoadIcons(string16* error);
811 bool LoadCommands(string16* error); 810 bool LoadCommands(string16* error);
812 bool LoadPlugins(string16* error); 811 bool LoadPlugins(string16* error);
813 bool LoadNaClModules(string16* error); 812 bool LoadNaClModules(string16* error);
814 bool LoadSandboxedPages(string16* error); 813 bool LoadSandboxedPages(string16* error);
815 // Must be called after LoadPlugins(). 814 // Must be called after LoadPlugins().
816 bool LoadRequirements(string16* error); 815 bool LoadRequirements(string16* error);
817 bool LoadDefaultLocale(string16* error);
818 bool LoadOfflineEnabled(string16* error); 816 bool LoadOfflineEnabled(string16* error);
819 bool LoadBackgroundScripts(string16* error); 817 bool LoadBackgroundScripts(string16* error);
820 bool LoadBackgroundScripts(const std::string& key, string16* error); 818 bool LoadBackgroundScripts(const std::string& key, string16* error);
821 bool LoadBackgroundPage(const APIPermissionSet& api_permissions, 819 bool LoadBackgroundPage(const APIPermissionSet& api_permissions,
822 string16* error); 820 string16* error);
823 bool LoadBackgroundPage(const std::string& key, 821 bool LoadBackgroundPage(const std::string& key,
824 const APIPermissionSet& api_permissions, 822 const APIPermissionSet& api_permissions,
825 string16* error); 823 string16* error);
826 bool LoadBackgroundPersistent( 824 bool LoadBackgroundPersistent(
827 const APIPermissionSet& api_permissions, 825 const APIPermissionSet& api_permissions,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 // this member variable to 0 to distinguish the "uninitialized" case from 927 // this member variable to 0 to distinguish the "uninitialized" case from
930 // the case when we know the manifest version actually is 1. 928 // the case when we know the manifest version actually is 1.
931 int manifest_version_; 929 int manifest_version_;
932 930
933 // The requirements declared in the manifest. 931 // The requirements declared in the manifest.
934 Requirements requirements_; 932 Requirements requirements_;
935 933
936 // The absolute path to the directory the extension is stored in. 934 // The absolute path to the directory the extension is stored in.
937 FilePath path_; 935 FilePath path_;
938 936
939 // Default locale for fall back. Can be empty if extension is not localized.
940 std::string default_locale_;
941
942 // If true, a separate process will be used for the extension in incognito 937 // If true, a separate process will be used for the extension in incognito
943 // mode. 938 // mode.
944 bool incognito_split_mode_; 939 bool incognito_split_mode_;
945 940
946 // Whether the extension or app should be enabled when offline. 941 // Whether the extension or app should be enabled when offline.
947 bool offline_enabled_; 942 bool offline_enabled_;
948 943
949 // Defines the set of URLs in the extension's web content. 944 // Defines the set of URLs in the extension's web content.
950 URLPatternSet extent_; 945 URLPatternSet extent_;
951 946
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 1163
1169 UpdatedExtensionPermissionsInfo( 1164 UpdatedExtensionPermissionsInfo(
1170 const Extension* extension, 1165 const Extension* extension,
1171 const PermissionSet* permissions, 1166 const PermissionSet* permissions,
1172 Reason reason); 1167 Reason reason);
1173 }; 1168 };
1174 1169
1175 } // namespace extensions 1170 } // namespace extensions
1176 1171
1177 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1172 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698