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

Unified Diff: chrome/service/cloud_print/cloud_print_proxy.cc

Issue 1010923002: If possible, use the PathService instead of the --user-data-dir flag directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: chrome/service/cloud_print/cloud_print_proxy.cc
diff --git a/chrome/service/cloud_print/cloud_print_proxy.cc b/chrome/service/cloud_print/cloud_print_proxy.cc
index a98fecb4e5be00535e0fbadc089dfbf963b6ae31..39c38613ac4d378a5b370b5120f381f6ef9e46e8 100644
--- a/chrome/service/cloud_print/cloud_print_proxy.cc
+++ b/chrome/service/cloud_print/cloud_print_proxy.cc
@@ -11,6 +11,7 @@
#include "base/process/kill.h"
#include "base/process/launch.h"
#include "base/values.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/cloud_print/cloud_print_constants.h"
#include "chrome/common/cloud_print/cloud_print_proxy_info.h"
@@ -34,10 +35,8 @@ void LaunchBrowserProcessWithSwitch(const std::string& switch_string) {
}
base::CommandLine cmd_line(exe_path);
- const base::CommandLine& process_command_line =
grt (UTC plus 2) 2015/03/26 18:36:22 i think this is okay as-is since the launched proc
noms (inactive) 2015/03/30 14:06:32 Done.
- *base::CommandLine::ForCurrentProcess();
- base::FilePath user_data_dir =
- process_command_line.GetSwitchValuePath(switches::kUserDataDir);
+ base::FilePath user_data_dir;
+ PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
if (!user_data_dir.empty())
cmd_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir);
cmd_line.AppendSwitch(switch_string);

Powered by Google App Engine
This is Rietveld 408576698