| Index: chrome/browser/profiles/profile_window.cc
|
| diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc
|
| index 35bbc96f69d4fb2538744caf90088f30565b447a..0a416623dab61bd8d88e8e63d8db52da31f2de8c 100644
|
| --- a/chrome/browser/profiles/profile_window.cc
|
| +++ b/chrome/browser/profiles/profile_window.cc
|
| @@ -42,6 +42,7 @@
|
| #include "components/signin/core/common/signin_switches.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/user_metrics.h"
|
| +#include "net/base/escape.h"
|
|
|
| #if defined(ENABLE_EXTENSIONS)
|
| #include "chrome/browser/extensions/extension_service.h"
|
| @@ -205,13 +206,11 @@ void OnUserManagerSystemProfileCreated(
|
| if (tutorial_mode == profiles::USER_MANAGER_TUTORIAL_OVERVIEW) {
|
| page += profiles::kUserManagerDisplayTutorial;
|
| } else if (!profile_path_to_focus.empty()) {
|
| - const ProfileInfoCache& cache =
|
| - g_browser_process->profile_manager()->GetProfileInfoCache();
|
| - size_t index = cache.GetIndexOfProfileWithPath(profile_path_to_focus);
|
| - if (index != std::string::npos) {
|
| - page += "#";
|
| - page += base::SizeTToString(index);
|
| - }
|
| + // The file path is processed in the same way as base::CreateFilePathValue
|
| + // (i.e. convert to std::string with AsUTF8Unsafe()), and then URI encoded.
|
| + page += "#";
|
| + page += net::EscapeUrlEncodedData(profile_path_to_focus.AsUTF8Unsafe(),
|
| + false);
|
| } else if (profile_open_action ==
|
| profiles::USER_MANAGER_SELECT_PROFILE_TASK_MANAGER) {
|
| page += profiles::kUserManagerSelectProfileTaskManager;
|
|
|