| 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_STARTUP_HELPER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "chrome/browser/extensions/pack_extension_job.h" | 9 #include "chrome/browser/extensions/pack_extension_job.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // Handle --pack-extension flag from the |cmd_line| by packing the specified | 27 // Handle --pack-extension flag from the |cmd_line| by packing the specified |
| 28 // extension. Returns false if the pack job failed. | 28 // extension. Returns false if the pack job failed. |
| 29 bool PackExtension(const CommandLine& cmd_line); | 29 bool PackExtension(const CommandLine& cmd_line); |
| 30 | 30 |
| 31 // Handle --uninstall-extension flag from the |cmd_line| by uninstalling the | 31 // Handle --uninstall-extension flag from the |cmd_line| by uninstalling the |
| 32 // specified extension from |profile|. Returns false if the uninstall job | 32 // specified extension from |profile|. Returns false if the uninstall job |
| 33 // could not be started. | 33 // could not be started. |
| 34 bool UninstallExtension(const CommandLine& cmd_line, Profile* profile); | 34 bool UninstallExtension(const CommandLine& cmd_line, Profile* profile); |
| 35 | 35 |
| 36 // Handle --install-from-webstore flag from |cmd_line| by downloading |
| 37 // metadata from the webstore for the given id, prompting the user to |
| 38 // confirm, and then downloading the crx and installing it. |
| 39 bool InstallFromWebstore(const CommandLine& cmd_line, Profile* profile); |
| 40 |
| 36 private: | 41 private: |
| 37 scoped_refptr<PackExtensionJob> pack_job_; | 42 scoped_refptr<PackExtensionJob> pack_job_; |
| 38 bool pack_job_succeeded_; | 43 bool pack_job_succeeded_; |
| 39 | 44 |
| 40 DISALLOW_COPY_AND_ASSIGN(StartupHelper); | 45 DISALLOW_COPY_AND_ASSIGN(StartupHelper); |
| 41 }; | 46 }; |
| 42 | 47 |
| 43 } // namespace extensions | 48 } // namespace extensions |
| 44 | 49 |
| 45 #endif // CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_ | 50 #endif // CHROME_BROWSER_EXTENSIONS_STARTUP_HELPER_H_ |
| OLD | NEW |