| Index: chrome/browser/extensions/startup_helper.cc
|
| diff --git a/chrome/browser/extensions/startup_helper.cc b/chrome/browser/extensions/startup_helper.cc
|
| index 4074b5f7c849ac6145256c68fb78777493b9e84e..66c8ff155e2e86465e37c38d57f19a63a74bbd40 100644
|
| --- a/chrome/browser/extensions/startup_helper.cc
|
| +++ b/chrome/browser/extensions/startup_helper.cc
|
| @@ -264,6 +264,10 @@ void DeleteHelperAndRunCallback(AppInstallHelper* helper,
|
| callback.Run();
|
| }
|
|
|
| +void DeleteHelper(AppInstallHelper* helper) {
|
| + delete helper;
|
| +}
|
| +
|
| } // namespace
|
|
|
| bool StartupHelper::InstallFromWebstore(const CommandLine& cmd_line,
|
| @@ -302,6 +306,21 @@ void StartupHelper::LimitedInstallFromWebstore(
|
| helper, done_callback));
|
| }
|
|
|
| +void StartupHelper::InstallChromeApp(
|
| + const CommandLine& cmd_line,
|
| + Profile* profile) {
|
| + std::string id = cmd_line.GetSwitchValueASCII(switches::kInstallChromeApp);
|
| + if (!Extension::IdIsValid(id)) {
|
| + LOG(ERROR) << "Invalid id for " << switches::kInstallChromeApp
|
| + << " : '" << id << "'";
|
| + return;
|
| + }
|
| +
|
| + AppInstallHelper* helper = new AppInstallHelper();
|
| + helper->BeginInstall(profile, id, true /*show_prompt*/,
|
| + base::Bind(&DeleteHelper, helper));
|
| +}
|
| +
|
| std::string StartupHelper::WebStoreIdFromLimitedInstallCmdLine(
|
| const CommandLine& cmd_line) {
|
| std::string index = cmd_line.GetSwitchValueASCII(
|
|
|