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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 bool LoadFromCommandLine(const base::FilePath& extension_path, | 53 bool LoadFromCommandLine(const base::FilePath& extension_path, |
54 std::string* extension_id); | 54 std::string* extension_id, |
55 bool only_allow_apps); | |
msw
2016/07/21 17:13:50
nit: comment above: "used to avoid side-loading no
proberge
2016/07/25 20:40:53
Done.
| |
55 | 56 |
56 // Allows prompting for plugins to be disabled; intended for testing only. | 57 // Allows prompting for plugins to be disabled; intended for testing only. |
57 bool prompt_for_plugins() { return prompt_for_plugins_; } | 58 bool prompt_for_plugins() { return prompt_for_plugins_; } |
58 void set_prompt_for_plugins(bool val) { prompt_for_plugins_ = val; } | 59 void set_prompt_for_plugins(bool val) { prompt_for_plugins_ = val; } |
59 | 60 |
60 // Allows overriding of whether modern manifest versions are required; | 61 // Allows overriding of whether modern manifest versions are required; |
61 // intended for testing. | 62 // intended for testing. |
62 bool require_modern_manifest_version() const { | 63 bool require_modern_manifest_version() const { |
63 return require_modern_manifest_version_; | 64 return require_modern_manifest_version_; |
64 } | 65 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 ExtensionInstallChecker install_checker_; | 141 ExtensionInstallChecker install_checker_; |
141 | 142 |
142 CompletionCallback callback_; | 143 CompletionCallback callback_; |
143 | 144 |
144 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); | 145 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); |
145 }; | 146 }; |
146 | 147 |
147 } // namespace extensions | 148 } // namespace extensions |
148 | 149 |
149 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 150 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
OLD | NEW |