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

Unified Diff: trunk/src/android_webview/browser/aw_browser_context.cc

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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
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;

Powered by Google App Engine
This is Rietveld 408576698