mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefSetCookiePath() and CefSetStoragePath() functions for changing cookie and localStorage locations while CEF is running (issue #347).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@353 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -20,9 +20,9 @@ void CefTestSuite::Initialize() {
|
||||
|
||||
CommandLine* command_line = CommandLine::ForCurrentProcess();
|
||||
|
||||
if (command_line->HasSwitch("cache_path")) {
|
||||
std::string cache_path;
|
||||
if (GetCachePath(cache_path)) {
|
||||
// Set the cache_path value.
|
||||
std::string cache_path = command_line->GetSwitchValueASCII("cache_path");
|
||||
CefString(&settings.cache_path).FromASCII(cache_path.c_str());
|
||||
}
|
||||
|
||||
@@ -37,3 +37,16 @@ void CefTestSuite::Shutdown() {
|
||||
CefShutdown();
|
||||
TestSuite::Shutdown();
|
||||
}
|
||||
|
||||
// static
|
||||
bool CefTestSuite::GetCachePath(std::string& path) {
|
||||
CommandLine* command_line = CommandLine::ForCurrentProcess();
|
||||
|
||||
if (command_line->HasSwitch("cache_path")) {
|
||||
// Set the cache_path value.
|
||||
path = command_line->GetSwitchValueASCII("cache_path");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user