OLD | NEW |
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_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // ExtensionService::AddExtension() is called. | 43 // ExtensionService::AddExtension() is called. |
44 void Load(const base::FilePath& extension_path); | 44 void Load(const base::FilePath& extension_path); |
45 | 45 |
46 // Loads the extension from the directory |extension_path|; | 46 // Loads the extension from the directory |extension_path|; |
47 // for use with command line switch --load-extension=path or | 47 // for use with command line switch --load-extension=path or |
48 // --load-and-launch-app=path. | 48 // --load-and-launch-app=path. |
49 // This is equivalent to Load, except that it reads the extension from | 49 // This is equivalent to Load, except that it reads the extension from |
50 // |extension_path| synchronously. | 50 // |extension_path| synchronously. |
51 // The return value indicates whether the installation has begun successfully. | 51 // The return value indicates whether the installation has begun successfully. |
52 // The id of the extension being loaded is returned in |extension_id|. | 52 // The id of the extension being loaded is returned in |extension_id|. |
53 // |only_allow_apps| is used to avoid side-loading of non-app extensions. | |
54 bool LoadFromCommandLine(const base::FilePath& extension_path, | 53 bool LoadFromCommandLine(const base::FilePath& extension_path, |
55 std::string* extension_id, | 54 std::string* extension_id); |
56 bool only_allow_apps); | |
57 | 55 |
58 // Allows prompting for plugins to be disabled; intended for testing only. | 56 // Allows prompting for plugins to be disabled; intended for testing only. |
59 bool prompt_for_plugins() { return prompt_for_plugins_; } | 57 bool prompt_for_plugins() { return prompt_for_plugins_; } |
60 void set_prompt_for_plugins(bool val) { prompt_for_plugins_ = val; } | 58 void set_prompt_for_plugins(bool val) { prompt_for_plugins_ = val; } |
61 | 59 |
62 // Allows overriding of whether modern manifest versions are required; | 60 // Allows overriding of whether modern manifest versions are required; |
63 // intended for testing. | 61 // intended for testing. |
64 bool require_modern_manifest_version() const { | 62 bool require_modern_manifest_version() const { |
65 return require_modern_manifest_version_; | 63 return require_modern_manifest_version_; |
66 } | 64 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 ExtensionInstallChecker install_checker_; | 140 ExtensionInstallChecker install_checker_; |
143 | 141 |
144 CompletionCallback callback_; | 142 CompletionCallback callback_; |
145 | 143 |
146 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); | 144 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); |
147 }; | 145 }; |
148 | 146 |
149 } // namespace extensions | 147 } // namespace extensions |
150 | 148 |
151 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 149 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
OLD | NEW |