Commit 629feafa authored by Georges Khalil's avatar Georges Khalil Committed by Commit Bot

Strip version number from browser identification.

Before this patch, the browser identification contained the version number as well (which happens to be the last directory of the path). This patch strips that directory so that the identification stays stable after upgrades.

Change-Id: I11b3b37c37f01eb07d8003174ecf5c80da1ba718
Reviewed-on: https://chromium-review.googlesource.com/1028663Reviewed-by: default avatarOwen Min <zmin@chromium.org>
Commit-Queue: Georges Khalil <georgesak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553807}
parent 68138413
......@@ -53,7 +53,10 @@ enum Type {
std::string GetChromePath() {
base::FilePath path;
base::PathService::Get(chrome::DIR_APP, &path);
return path.AsUTF8Unsafe();
// The goal of this function is to return a unique path that will be used to
// identify this browser instance. Since the last component is contains the
// version number (which changes with every upgrade), it is stripped.
return path.DirName().AsUTF8Unsafe();
}
std::string GetProfileId(const Profile* profile) {
......
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