Skip to content

Commit

Permalink
Uplift of #14814 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Aug 25, 2022
1 parent e8adade commit 5e91d3a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions chromium_src/chrome/browser/profiles/profile_destroyer.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright (c) 2022 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "chrome/browser/profiles/profile_destroyer.h"

// When there are multiple OTR profiles, such as with a Private window and a Tor
// window open, it doesn't make sense that when destroying one of the OTR
// profiles the Chromium code wants to check that hosts for all OTR profiles are
// gone.
#define BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE \
if (!profile->IsOffTheRecord())

#include "src/chrome/browser/profiles/profile_destroyer.cc"
#undef BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE
12 changes: 12 additions & 0 deletions patches/chrome-browser-profiles-profile_destroyer.cc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/chrome/browser/profiles/profile_destroyer.cc b/chrome/browser/profiles/profile_destroyer.cc
index 517fd2a8a924f3076ad14105a0ec2677e18b0c79..1abc39094e3ffa59725dbeec543eac4371b81d18 100644
--- a/chrome/browser/profiles/profile_destroyer.cc
+++ b/chrome/browser/profiles/profile_destroyer.cc
@@ -88,6 +88,7 @@ void ProfileDestroyer::DestroyProfileWhenAppropriate(Profile* const profile) {
// ignored during shutdown and by the System Profile do not either.
HostSet profile_hosts;
GetHostsForProfile(&profile_hosts, profile);
+ BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE
for (Profile* otr_profile : profile->GetAllOffTheRecordProfiles()) {
GetHostsForProfile(&profile_hosts, otr_profile);
}

0 comments on commit 5e91d3a

Please sign in to comment.