| Index: trunk/src/android_webview/browser/aw_browser_context.cc
|
| ===================================================================
|
| --- trunk/src/android_webview/browser/aw_browser_context.cc (revision 219785)
|
| +++ trunk/src/android_webview/browser/aw_browser_context.cc (working copy)
|
| @@ -21,9 +21,6 @@
|
| #include "content/public/browser/resource_context.h"
|
| #include "content/public/browser/storage_partition.h"
|
| #include "content/public/browser/web_contents.h"
|
| -#include "content/public/common/content_constants.h"
|
| -#include "content/public/common/url_constants.h"
|
| -#include "net/cookies/cookie_monster.h"
|
| #include "net/url_request/url_request_context.h"
|
|
|
| namespace android_webview {
|
| @@ -98,11 +95,16 @@
|
| }
|
|
|
| void AwBrowserContext::PreMainMessageLoopRun() {
|
| - url_request_context_getter_ = new AwURLRequestContextGetter(GetPath());
|
| + cookie_store_ = content::CreatePersistentCookieStore(
|
| + GetPath().Append(FILE_PATH_LITERAL("Cookies")),
|
| + true,
|
| + NULL,
|
| + NULL);
|
| + cookie_store_->GetCookieMonster()->SetPersistSessionCookies(true);
|
| + url_request_context_getter_ =
|
| + new AwURLRequestContextGetter(GetPath(), cookie_store_.get());
|
|
|
| - DidCreateCookieMonster(
|
| - GetDefaultStoragePartition(this)->GetCookieStoreForScheme(
|
| - chrome::kHttpScheme)->GetCookieMonster());
|
| + DidCreateCookieMonster(cookie_store_->GetCookieMonster());
|
|
|
| visitedlink_master_.reset(
|
| new visitedlink::VisitedLinkMaster(this, this, false));
|
| @@ -180,22 +182,6 @@
|
| return context_storage_path_;
|
| }
|
|
|
| -void AwBrowserContext::OverrideCookieStoreConfigs(
|
| - const base::FilePath& partition_path,
|
| - bool in_memory_partition,
|
| - bool is_default_partition,
|
| - CookieSchemeMap* configs) {
|
| - using content::CookieStoreConfig;
|
| - configs->clear();
|
| - // By default session cookies are always restored. An Android application can
|
| - // control this policy by calling CookieManager.removeSessionCookie() when
|
| - // Activity.onCreate() is called with savedInstanceState == null.
|
| - (*configs)[content::BrowserContext::kDefaultCookieScheme] =
|
| - CookieStoreConfig(partition_path.Append(content::kCookieFilename),
|
| - CookieStoreConfig::RESTORED_SESSION_COOKIES,
|
| - NULL, NULL);
|
| -}
|
| -
|
| bool AwBrowserContext::IsOffTheRecord() const {
|
| // Android WebView does not support off the record profile yet.
|
| return false;
|
|
|