Respect policy when migrating existing icons with no AppId.

BUG=173237,28104
TEST=Pinned Chrome icons should not spawn second icon when chrome is started with userDataDir policy set.

Review URL: https://chromiumcodereview.appspot.com/18106003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209327 0039d316-1c4b-4281-b951-d872f2087c98
parent cf550eb0
......@@ -23,6 +23,7 @@
#include "base/win/scoped_propvariant.h"
#include "base/win/shortcut.h"
#include "base/win/windows_version.h"
#include "chrome/browser/policy/policy_path_parser.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
......@@ -96,6 +97,8 @@ string16 GetExpectedAppId(const CommandLine& command_line,
user_data_dir = command_line.GetSwitchValuePath(switches::kUserDataDir);
else
chrome::GetDefaultUserDataDirectory(&user_data_dir);
// Adjust with any policy that overrides any other way to set the path.
policy::path_parser::CheckUserDataDirPolicy(&user_data_dir);
DCHECK(!user_data_dir.empty());
base::FilePath profile_subdir;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment