Commit 6ed044f1 authored by John Z Wu's avatar John Z Wu Committed by Commit Bot

Fix issue where it fails when writing to pref files

The intermediate "ChromeWebView" folder was never created, so writes to
files in that folder just fails.

Change-Id: I2d0880fd9ce600fab08f4e23ed116febdaf76b95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825735
Commit-Queue: John Wu <jzw@chromium.org>
Reviewed-by: default avatarHiroshi Ichikawa <ichikawa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700075}
parent 93c66633
......@@ -109,9 +109,7 @@ PrefService* ApplicationContext::GetLocalState() {
base::FilePath local_state_path;
base::PathService::Get(base::DIR_APP_DATA, &local_state_path);
local_state_path =
local_state_path.Append(FILE_PATH_LITERAL("ChromeWebView"));
local_state_path =
local_state_path.Append(FILE_PATH_LITERAL("Local State"));
local_state_path.Append(FILE_PATH_LITERAL("ChromeWebViewLocalState"));
scoped_refptr<PersistentPrefStore> user_pref_store =
new JsonPrefStore(std::move(local_state_path));
......
......@@ -61,7 +61,8 @@
#endif
namespace {
const char kPreferencesFilename[] = FILE_PATH_LITERAL("Preferences");
const char kPreferencesFilename[] =
FILE_PATH_LITERAL("ChromeWebViewPreferences");
}
namespace ios_web_view {
......
......@@ -79,7 +79,7 @@ net::URLRequestContext* WebViewURLRequestContextGetter::GetURLRequestContext() {
bool cookie_path_found =
base::PathService::Get(base::DIR_APP_DATA, &cookie_path);
DCHECK(cookie_path_found);
cookie_path = cookie_path.Append("ChromeWebView").Append("Cookies");
cookie_path = cookie_path.Append("ChromeWebViewCookies");
scoped_refptr<net::CookieMonster::PersistentCookieStore> persistent_store =
new net::SQLitePersistentCookieStore(
cookie_path, network_task_runner_,
......@@ -151,7 +151,8 @@ net::URLRequestContext* WebViewURLRequestContextGetter::GetURLRequestContext() {
network_session_context.ct_policy_enforcer =
url_request_context_->ct_policy_enforcer();
base::FilePath cache_path = base_path_.Append(FILE_PATH_LITERAL("Cache"));
base::FilePath cache_path =
base_path_.Append(FILE_PATH_LITERAL("ChromeWebViewCache"));
std::unique_ptr<net::HttpCache::DefaultBackend> main_backend(
new net::HttpCache::DefaultBackend(
net::DISK_CACHE, net::CACHE_BACKEND_DEFAULT, cache_path, 0));
......
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