| Index: chrome/browser/chromeos/profiles/profile_helper.cc
|
| diff --git a/chrome/browser/chromeos/profiles/profile_helper.cc b/chrome/browser/chromeos/profiles/profile_helper.cc
|
| index 08c4058c313c559c6f027ec55a996e65d74a9345..91ff48c42cd6d40251e1c900dc529c808b52e049 100644
|
| --- a/chrome/browser/chromeos/profiles/profile_helper.cc
|
| +++ b/chrome/browser/chromeos/profiles/profile_helper.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/barrier_closure.h"
|
| #include "base/callback.h"
|
| #include "base/command_line.h"
|
| +#include "base/strings/string_util.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/browsing_data/browsing_data_helper.h"
|
| #include "chrome/browser/browsing_data/browsing_data_remover.h"
|
| @@ -138,13 +139,12 @@ std::string ProfileHelper::GetUserIdHashFromProfile(const Profile* profile) {
|
|
|
| // Check that profile directory starts with the correct prefix.
|
| std::string prefix(chrome::kProfileDirPrefix);
|
| - if (profile_dir.find(prefix) != 0) {
|
| + if (!base::StartsWith(profile_dir, prefix, base::CompareCase::SENSITIVE)) {
|
| // This happens when creating a TestingProfile in browser tests.
|
| return std::string();
|
| }
|
|
|
| - return profile_dir.substr(prefix.length(),
|
| - profile_dir.length() - prefix.length());
|
| + return profile_dir.substr(prefix.length());
|
| }
|
|
|
| // static
|
|
|