Commit 94557c5b authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Revert "Prevent opening a deleted profile"

This reverts commit 33b07d13.

Reason for revert: This change leads to crashes when sending feedback reports

Original change's description:
> Prevent opening a deleted profile
> 
> When deleting a profile, the profile will be marked as deleted and all
> browsing data is removed but the profile folder will remain until shutdown
> and it still contains some data like bookmarks and settings. Using command
> line arguments it is possible to open a new window for this profile.
> This CL changes the profile manager to not return profiles that have
> been deleted. Instead of opening a window for a deleted profile,
> Chrome will refuse to open the window.
> 
> Bug: 803643
> Change-Id: Iae3caf93b2895d23b90aeb6550197a81038a1ec6
> Reviewed-on: https://chromium-review.googlesource.com/883342
> Reviewed-by: Stefan Kuhne <skuhne@chromium.org>
> Commit-Queue: Christian Dullweber <dullweber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#532378}

TBR=skuhne@chromium.org,dullweber@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 803643, 807745
Change-Id: I44ad772e3d1b7fc21ec9e414cd92c1d4b915a7af
Reviewed-on: https://chromium-review.googlesource.com/897522Reviewed-by: default avatarChristian Dullweber <dullweber@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533615}
parent 3a4c261b
......@@ -725,10 +725,6 @@ Profile* ProfileManager::GetProfileByPathInternal(
Profile* ProfileManager::GetProfileByPath(const base::FilePath& path) const {
TRACE_EVENT0("browser", "ProfileManager::GetProfileByPath");
if (IsProfileDirectoryMarkedForDeletion(path)) {
LOG(ERROR) << "Tried to get deleted profile: " << path.value();
return nullptr;
}
ProfileInfo* profile_info = GetProfileInfoByPath(path);
return (profile_info && profile_info->created) ? profile_info->profile.get()
: nullptr;
......
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