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

Unified Diff: chrome/browser/ui/views/app_list/win/app_list_service_win.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/browser/ui/views/app_list/win/app_list_service_win.cc
diff --git a/chrome/browser/ui/views/app_list/win/app_list_service_win.cc b/chrome/browser/ui/views/app_list/win/app_list_service_win.cc
index ba5d1550d9595158c82c75e19de7736c0cb0ac14..3bc1d095c0caead056ab84b8867445af07f3f3d0 100644
--- a/chrome/browser/ui/views/app_list/win/app_list_service_win.cc
+++ b/chrome/browser/ui/views/app_list/win/app_list_service_win.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/ui/views/app_list/win/app_list_win.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
@@ -126,11 +127,9 @@ base::string16 GetAppModelId() {
// but different for different user data directories, so base it on the
// initial profile in the current user data directory.
base::FilePath initial_profile_path;
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
grt (UTC plus 2) 2015/03/26 18:36:22 i hate to say it, but leave this one alone. it wou
noms (inactive) 2015/03/30 14:06:32 Done.
- if (command_line->HasSwitch(switches::kUserDataDir)) {
- initial_profile_path =
- command_line->GetSwitchValuePath(switches::kUserDataDir).AppendASCII(
- chrome::kInitialProfile);
+ if (PathService::Get(chrome::DIR_USER_DATA, &initial_profile_path)) {
+ initial_profile_path = initial_profile_path.AppendASCII(
+ chrome::kInitialProfile);
}
return ShellIntegration::GetAppListAppModelIdForProfile(initial_profile_path);
}

Powered by Google App Engine
This is Rietveld 408576698