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

Unified Diff: trunk/src/chrome/installer/setup/install.cc

Issue 422593002: Revert 285661 "Remove some dead app host code." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/chrome/installer/setup/install.h ('k') | trunk/src/chrome/installer/setup/setup_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/installer/setup/install.cc
===================================================================
--- trunk/src/chrome/installer/setup/install.cc (revision 285705)
+++ trunk/src/chrome/installer/setup/install.cc (working copy)
@@ -10,12 +10,14 @@
#include <string>
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/numerics/safe_conversions.h"
#include "base/path_service.h"
+#include "base/process/launch.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -23,6 +25,7 @@
#include "base/win/windows_version.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/installer/launcher_support/chrome_launcher_support.h"
#include "chrome/installer/setup/install_worker.h"
#include "chrome/installer/setup/setup_constants.h"
#include "chrome/installer/util/auto_launch_util.h"
@@ -688,4 +691,15 @@
chrome_exe, chrome, prefs, CURRENT_USER, install_operation);
}
+bool InstallFromWebstore(const std::string& app_code) {
+ base::FilePath app_host_path(chrome_launcher_support::GetAnyAppHostPath());
+ if (app_host_path.empty())
+ return false;
+
+ CommandLine cmd(app_host_path);
+ cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code);
+ VLOG(1) << "App install command: " << cmd.GetCommandLineString();
+ return base::LaunchProcess(cmd, base::LaunchOptions(), NULL);
+}
+
} // namespace installer
« no previous file with comments | « trunk/src/chrome/installer/setup/install.h ('k') | trunk/src/chrome/installer/setup/setup_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698