|
@@ -91,6 +91,7 @@
|
|
|
#endif
|
|
|
|
|
|
#if BUILDFLAG(IS_MAC)
|
|
|
+#include "components/os_crypt/keychain_password_mac.h"
|
|
|
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
|
|
|
#include "shell/browser/ui/cocoa/views_delegate_mac.h"
|
|
|
#else
|
|
@@ -490,6 +491,9 @@ void ElectronBrowserMainParts::WillRunMainMessageLoop(
|
|
|
}
|
|
|
|
|
|
void ElectronBrowserMainParts::PostCreateMainMessageLoop() {
|
|
|
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
|
|
|
+ std::string app_name = electron::Browser::Get()->GetName();
|
|
|
+#endif
|
|
|
#if BUILDFLAG(IS_LINUX)
|
|
|
auto shutdown_cb =
|
|
|
base::BindOnce(base::RunLoop::QuitCurrentWhenIdleClosureDeprecated());
|
|
@@ -500,7 +504,6 @@ void ElectronBrowserMainParts::PostCreateMainMessageLoop() {
|
|
|
// Set up crypt config. This needs to be done before anything starts the
|
|
|
// network service, as the raw encryption key needs to be shared with the
|
|
|
// network service for encrypted cookie storage.
|
|
|
- std::string app_name = electron::Browser::Get()->GetName();
|
|
|
const base::CommandLine& command_line =
|
|
|
*base::CommandLine::ForCurrentProcess();
|
|
|
std::unique_ptr<os_crypt::Config> config =
|
|
@@ -517,6 +520,10 @@ void ElectronBrowserMainParts::PostCreateMainMessageLoop() {
|
|
|
base::PathService::Get(DIR_SESSION_DATA, &config->user_data_path);
|
|
|
OSCrypt::SetConfig(std::move(config));
|
|
|
#endif
|
|
|
+#if BUILDFLAG(IS_MAC)
|
|
|
+ KeychainPassword::GetServiceName() = app_name + " Safe Storage";
|
|
|
+ KeychainPassword::GetAccountName() = app_name;
|
|
|
+#endif
|
|
|
#if BUILDFLAG(IS_POSIX)
|
|
|
// Exit in response to SIGINT, SIGTERM, etc.
|
|
|
InstallShutdownSignalHandlers(
|