summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration.cc
diff options
context:
space:
mode:
authorpastarmovj@google.com <pastarmovj@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-20 15:32:55 +0000
committerpastarmovj@google.com <pastarmovj@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-20 15:32:55 +0000
commitba26a4440ea5dbd51953dd0a061e39b5861ab777 (patch)
tree550d5136bba3218875cc143608dce3f2b0d31ea1 /chrome/browser/shell_integration.cc
parent3b2a3a8217291d39492fc5320994977397baf340 (diff)
downloadchromium_src-ba26a4440ea5dbd51953dd0a061e39b5861ab777.zip
chromium_src-ba26a4440ea5dbd51953dd0a061e39b5861ab777.tar.gz
chromium_src-ba26a4440ea5dbd51953dd0a061e39b5861ab777.tar.bz2
Make sure ShellIntegration::CommandLineArgsForLauncher respects the UserDataDir policy.
If this is not done shortcuts created will not contain the right path and will cause faulty behavior on Windows. BUG=173237 TEST=As described in the bug. Review URL: https://codereview.chromium.org/12277002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration.cc')
-rw-r--r--chrome/browser/shell_integration.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index 674e12f..cd299c5 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -11,6 +11,7 @@
#include "base/prefs/pref_service.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/policy/policy_path_parser.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -62,6 +63,9 @@ CommandLine ShellIntegration::CommandLineArgsForLauncher(
// Use the same UserDataDir for new launches that we currently have set.
base::FilePath user_data_dir =
cmd_line.GetSwitchValuePath(switches::kUserDataDir);
+#if defined(OS_MACOSX) || defined(OS_WIN)
+ policy::path_parser::CheckUserDataDirPolicy(&user_data_dir);
+#endif
if (!user_data_dir.empty()) {
// Make sure user_data_dir is an absolute path.
if (file_util::AbsolutePath(&user_data_dir) &&