Create temporary cache_path directory if none is specified (issue #735).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@814 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
61b0934996
commit
c4a2ee9b8d
|
@ -188,6 +188,14 @@ bool CefContext::Initialize(const CefMainArgs& args,
|
|||
NOTREACHED() << "The cache_path directory could not be created";
|
||||
cache_path_ = FilePath();
|
||||
}
|
||||
if (cache_path_.empty()) {
|
||||
// Create and use a temporary directory.
|
||||
if (cache_temp_dir_.CreateUniqueTempDir()) {
|
||||
cache_path_ = cache_temp_dir_.path();
|
||||
} else {
|
||||
NOTREACHED() << "Failed to create temporary cache_path directory";
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(OS_WIN)
|
||||
if (settings.multi_threaded_message_loop) {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "base/file_path.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/scoped_temp_dir.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -87,6 +88,7 @@ class CefContext : public CefBase {
|
|||
|
||||
CefSettings settings_;
|
||||
FilePath cache_path_;
|
||||
ScopedTempDir cache_temp_dir_;
|
||||
|
||||
// Map of browsers that currently exist.
|
||||
BrowserList browserlist_;
|
||||
|
|
Loading…
Reference in New Issue