Commit 8bbce036 authored by gunsch's avatar gunsch Committed by Commit bot

Chromecast: set Android profile dir and ensure it exists.

R=lcwu@chromium.org,byungchul@chromium.org
BUG=400876

Review URL: https://codereview.chromium.org/591413006

Cr-Commit-Position: refs/heads/master@{#296583}
parent 2ca0f9c9
......@@ -59,11 +59,19 @@ CastBrowserContext::~CastBrowserContext() {
}
void CastBrowserContext::InitWhileIOAllowed() {
#if defined(OS_ANDROID)
CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &path_));
path_ = path_.Append(FILE_PATH_LITERAL("cast_shell"));
if (!base::PathExists(path_))
base::CreateDirectory(path_);
#else
// Chromecast doesn't support user profiles nor does it have
// incognito mode. This means that all of the persistent
// data (currently only cookies and local storage) will be
// shared in a single location as defined here.
CHECK(PathService::Get(DIR_CAST_HOME, &path_));
#endif // defined(OS_ANDROID)
}
base::FilePath CastBrowserContext::GetPath() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment