summaryrefslogtreecommitdiffstats
path: root/cloud_print/service
diff options
context:
space:
mode:
authormgiuca <mgiuca@chromium.org>2015-01-13 17:19:36 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-14 01:21:15 +0000
commite1b07409f19d84853d4730e3ab5b862fd65838d0 (patch)
treef12a7da6dd1f33714b14e11301fc5aed50b8f804 /cloud_print/service
parent4b73fadb148e51fdc0abff8ccc42bf33a0dc4efd (diff)
downloadchromium_src-e1b07409f19d84853d4730e3ab5b862fd65838d0.zip
chromium_src-e1b07409f19d84853d4730e3ab5b862fd65838d0.tar.gz
chromium_src-e1b07409f19d84853d4730e3ab5b862fd65838d0.tar.bz2
Refactor chrome_launcher_support::GetAnyChromePath.
Combined GetAnyChromePath and GetChromeSxSPath into one function that takes a bool |is_sxs|. Avoids the need to have a wrapper function that conditionally calls GetAnyChromePath or GetAnyChromeSxsPath. BUG=428600 Review URL: https://codereview.chromium.org/685103004 Cr-Commit-Position: refs/heads/master@{#311384}
Diffstat (limited to 'cloud_print/service')
-rw-r--r--cloud_print/service/win/chrome_launcher.cc6
-rw-r--r--cloud_print/service/win/service_listener.cc5
2 files changed, 7 insertions, 4 deletions
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc
index d63dc8f..2b1ce80 100644
--- a/cloud_print/service/win/chrome_launcher.cc
+++ b/cloud_print/service/win/chrome_launcher.cc
@@ -198,7 +198,8 @@ void ChromeLauncher::Run() {
for (base::TimeDelta time_out = default_time_out;;
time_out = std::min(time_out * 2, max_time_out)) {
- base::FilePath chrome_path = chrome_launcher_support::GetAnyChromePath();
+ base::FilePath chrome_path =
+ chrome_launcher_support::GetAnyChromePath(false /* is_sxs */);
if (!chrome_path.empty()) {
base::CommandLine cmd(chrome_path);
@@ -258,7 +259,8 @@ std::string ChromeLauncher::CreateServiceStateFile(
return std::string();
}
- base::FilePath chrome_path = chrome_launcher_support::GetAnyChromePath();
+ base::FilePath chrome_path =
+ chrome_launcher_support::GetAnyChromePath(false /* is_sxs */);
if (chrome_path.empty()) {
LOG(ERROR) << "Can't find Chrome.";
return std::string();
diff --git a/cloud_print/service/win/service_listener.cc b/cloud_print/service/win/service_listener.cc
index 0aaf0f3..f4af6dd 100644
--- a/cloud_print/service/win/service_listener.cc
+++ b/cloud_print/service/win/service_listener.cc
@@ -35,8 +35,9 @@ std::string GetEnvironment(const base::FilePath& user_data_dir) {
printing::XPSModule::Init());
environment.SetString(SetupListener::kUserNameJsonValueName,
GetCurrentUserName());
- environment.SetString(SetupListener::kChromePathJsonValueName,
- chrome_launcher_support::GetAnyChromePath().value());
+ environment.SetString(
+ SetupListener::kChromePathJsonValueName,
+ chrome_launcher_support::GetAnyChromePath(false /* is_sxs */).value());
if (base::CreateDirectory(user_data_dir)) {
base::FilePath temp_file;
if (base::CreateTemporaryFileInDir(user_data_dir, &temp_file)) {