Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Unified Diff: chromecast/shell/browser/cast_browser_context.cc

Issue 591413006: Chromecast: set Android profile dir and ensure it exists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/shell/browser/cast_browser_context.cc
diff --git a/chromecast/shell/browser/cast_browser_context.cc b/chromecast/shell/browser/cast_browser_context.cc
index b9fa05e0e64f39455f03503cf04d6a5f2f860ddd..487cfa5ae797f0b9e5ece0b3be6fc9b740026761 100644
--- a/chromecast/shell/browser/cast_browser_context.cc
+++ b/chromecast/shell/browser/cast_browser_context.cc
@@ -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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698