From ba26a4440ea5dbd51953dd0a061e39b5861ab777 Mon Sep 17 00:00:00 2001 From: "pastarmovj@google.com" Date: Wed, 20 Feb 2013 15:32:55 +0000 Subject: 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 --- chrome/app/chrome_main_mac.mm | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'chrome/app/chrome_main_mac.mm') diff --git a/chrome/app/chrome_main_mac.mm b/chrome/app/chrome_main_mac.mm index 65a70bf..6fd8783 100644 --- a/chrome/app/chrome_main_mac.mm +++ b/chrome/app/chrome_main_mac.mm @@ -15,26 +15,7 @@ #import "base/mac/foundation_util.h" #import "base/mac/scoped_nsautorelease_pool.h" #include "base/sys_string_conversions.h" -#include "chrome/browser/policy/policy_path_parser.h" #include "chrome/common/chrome_paths_internal.h" -#include "policy/policy_constants.h" - -void CheckUserDataDirPolicy(base::FilePath* user_data_dir) { - base::mac::ScopedNSAutoreleasePool pool; - - // Since the configuration management infrastructure is not initialized when - // this code runs, read the policy preference directly. - NSString* key = base::SysUTF8ToNSString(policy::key::kUserDataDir); - NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; - NSString* value = [defaults stringForKey:key]; - if (value && [defaults objectIsForcedForKey:key]) { - std::string string_value = base::SysNSStringToUTF8(value); - // Now replace any vars the user might have used. - string_value = - policy::path_parser::ExpandPathVariables(string_value); - *user_data_dir = base::FilePath(string_value); - } -} void SetUpBundleOverrides() { base::mac::ScopedNSAutoreleasePool pool; -- cgit v1.1