summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-04 12:28:13 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-04 12:28:13 +0000
commit7c4b66b04891b457cee5d6fe843ac1fbd50916a7 (patch)
treeaeda67fd3fd454c18d7859138f2a3c8da98309b1 /content/shell
parentec0414441e97a4e839327982c3470c11770df980 (diff)
downloadchromium_src-7c4b66b04891b457cee5d6fe843ac1fbd50916a7.zip
chromium_src-7c4b66b04891b457cee5d6fe843ac1fbd50916a7.tar.gz
chromium_src-7c4b66b04891b457cee5d6fe843ac1fbd50916a7.tar.bz2
Make CookieMonster::Delegate top-level and remove global CookieMonster::EnableFileScheme().
Also, in all modules that depend on content, replaces direct creation of new net::CookieMonster() with content::CreateInMemoryCookieStore(). This creation method knows how to respect the --enable-file-cookies flag. Makes webkit layout tests work. Relanding parts of https://chromiumcodereview.appspot.com/12546016 TBR=jam,rsleevi,boliu,esprehn BUG=159193, 331424 Review URL: https://codereview.chromium.org/116293006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/app/shell_main_delegate.cc2
-rw-r--r--content/shell/browser/shell_url_request_context_getter.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc
index 9867be7..acdc875 100644
--- a/content/shell/app/shell_main_delegate.cc
+++ b/content/shell/app/shell_main_delegate.cc
@@ -171,7 +171,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
command_line.AppendSwitch(switches::kDisableDelegatedRenderer);
#endif
- net::CookieMonster::EnableFileScheme();
+ command_line.AppendSwitch(switches::kEnableFileCookies);
// Unless/until WebM files are added to the media layout tests, we need to
// avoid removing MP4/H264/AAC so that layout tests can run on Android.
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc
index 6df718d..c31b26c 100644
--- a/content/shell/browser/shell_url_request_context_getter.cc
+++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -12,6 +12,7 @@
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/worker_pool.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/cookie_store_factory.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/shell/browser/shell_network_delegate.h"
@@ -101,7 +102,7 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
url_request_context_->set_network_delegate(network_delegate_.get());
storage_.reset(
new net::URLRequestContextStorage(url_request_context_.get()));
- storage_->set_cookie_store(new net::CookieMonster(NULL, NULL));
+ storage_->set_cookie_store(CreateInMemoryCookieStore(NULL));
storage_->set_server_bound_cert_service(new net::ServerBoundCertService(
new net::DefaultServerBoundCertStore(NULL),
base::WorkerPool::GetTaskRunner(true)));