fix: allow access to the profile dir in mac network sandbox (nws13n) (#17931)
This commit is contained in:
parent
e1e055a837
commit
9b779657fb
2 changed files with 11 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "atom/browser/atom_browser_context.h"
|
||||
#include "atom/browser/atom_browser_main_parts.h"
|
||||
#include "atom/browser/atom_navigation_throttle.h"
|
||||
#include "atom/browser/atom_paths.h"
|
||||
#include "atom/browser/atom_quota_permission_context.h"
|
||||
#include "atom/browser/atom_resource_dispatcher_host_delegate.h"
|
||||
#include "atom/browser/atom_speech_recognition_manager_delegate.h"
|
||||
|
@ -902,6 +903,15 @@ void AtomBrowserClient::OnNetworkServiceCreated(
|
|||
network_service);
|
||||
}
|
||||
|
||||
std::vector<base::FilePath>
|
||||
AtomBrowserClient::GetNetworkContextsParentDirectory() {
|
||||
base::FilePath user_data_dir;
|
||||
base::PathService::Get(DIR_USER_DATA, &user_data_dir);
|
||||
DCHECK(!user_data_dir.empty());
|
||||
|
||||
return {user_data_dir};
|
||||
}
|
||||
|
||||
bool AtomBrowserClient::ShouldBypassCORB(int render_process_id) const {
|
||||
// This is called on the network thread.
|
||||
base::AutoLock auto_lock(process_preferences_lock_);
|
||||
|
|
|
@ -154,6 +154,7 @@ class AtomBrowserClient : public content::ContentBrowserClient,
|
|||
GetSystemSharedURLLoaderFactory() override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
std::vector<base::FilePath> GetNetworkContextsParentDirectory() override;
|
||||
bool ShouldBypassCORB(int render_process_id) const override;
|
||||
std::string GetProduct() const override;
|
||||
std::string GetUserAgent() const override;
|
||||
|
|
Loading…
Reference in a new issue