Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
ClearHostCacheCallback should be in IsOffTheRecord block
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Aug 31, 2018
1 parent 7050961 commit 232da3e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions brave/browser/brave_browser_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,6 @@ BraveBrowserContext::~BraveBrowserContext() {
}
}

// Clears any data the network stack contains that may be related to the
// OTR session. Must be done before DestroyBrowserContextServices, since
// the NetworkContext is managed by one such service.
GetDefaultStoragePartition(this)->GetNetworkContext()->ClearHostCache(
nullptr, network::mojom::NetworkContext::ClearHostCacheCallback());

BrowserContextDependencyManager::GetInstance()->
DestroyBrowserContextServices(this);
Expand All @@ -282,6 +277,11 @@ BraveBrowserContext::~BraveBrowserContext() {
base::Bind(&NotifyOTRProfileDestroyedOnIOThread,
base::Unretained(original_context_), base::Unretained(this)));
#endif
// Clears any data the network stack contains that may be related to the
// OTR session. Must be done before DestroyBrowserContextServices, since
// the NetworkContext is managed by one such service.
GetDefaultStoragePartition(this)->GetNetworkContext()->ClearHostCache(
nullptr, network::mojom::NetworkContext::ClearHostCacheCallback());
}

ShutdownStoragePartitions();
Expand Down

0 comments on commit 232da3e

Please sign in to comment.