alloy: Add callback for already running app relaunch (fixes #3615)

Executes CefBrowserProcessHandler::OnAlreadyRunningAppRelaunch
callback for when an already running app is relaunched with the
same CefSettings.root_cache_path.

Adds "Root Cache Path" value and related explainer text to
chrome://version.

Adds a LOG(WARNING) that will be output on startup if
CefSettings.root_cache_path is unset in the client app.
This commit is contained in:
Marshall Greenblatt
2023-12-04 18:45:54 -05:00
parent 5613af8f53
commit 0dd7dca229
12 changed files with 233 additions and 30 deletions

View File

@@ -13,6 +13,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/path_service.h"
#include "chrome/common/chrome_constants.h"
@@ -89,6 +90,10 @@ base::FilePath GetUserDataPath(CefSettings* settings,
}
if (!root_cache_path.empty()) {
return base::FilePath(root_cache_path);
} else {
LOG(WARNING) << "Please customize CefSettings.root_cache_path for your "
"application. Use of the default value may lead to "
"unintended process singleton behavior.";
}
}