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

Unified Diff: chrome/browser/shell_integration.cc

Issue 12277002: Make sure ShellIntegration::CommandLineArgsForLauncher respects the UserDataDir policy. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: More documentation. Created 7 years, 10 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 | « chrome/browser/policy/policy_path_parser_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration.cc
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index 674e12f5a45a8626a181a5fd84c259907e4c8112..cd299c55abc67cb73c7f427fcc4c333d769d6772 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) &&
« no previous file with comments | « chrome/browser/policy/policy_path_parser_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698