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:
Marshall Greenblatt
2011-11-02 19:50:00 +00:00
parent 7a4cb9dd20
commit 28adf8908a
14 changed files with 474 additions and 134 deletions

View File

@@ -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;
}