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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 9865018: Enable cookies per default in net. Add an API to disable them by default, and do that in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index f689512dbc8ada5a69d8381b65452cfb01586775..d9e5b747126288dc3965afc33056b7dde65fe16e 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -34,6 +34,7 @@
#include "content/public/common/content_client.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
+#include "net/url_request/url_request.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h"
@@ -394,6 +395,10 @@ struct MainFunction {
} // namespace
ChromeMainDelegate::ChromeMainDelegate() {
+ // Chrome disallows cookies per default. All code paths that need to use
wtc 2012/03/28 17:51:05 Nit: per default => by default
jochen (gone - plz use gerrit) 2012/03/29 18:33:24 Done.
+ // cookies need to go through one of chrome's URLRequestContexts which have
+ // a ChromeNetworkDelegate attached that selectively allows cookies again.
+ net::URLRequest::SetDefaultCookiePolicyToBlock();
jam 2012/03/27 19:17:35 why do this in chrome/app instead of chrome/browse
jochen (gone - plz use gerrit) 2012/03/29 18:33:24 Done.
}
ChromeMainDelegate::~ChromeMainDelegate() {
« no previous file with comments | « chrome/app/DEPS ('k') | net/url_request/url_request.h » ('j') | net/url_request/url_request.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698