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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10407124: Don't force non-session only cookies to be session only cookies, instead delete on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 const std::string& cookie_line, 907 const std::string& cookie_line,
908 content::ResourceContext* context, 908 content::ResourceContext* context,
909 int render_process_id, 909 int render_process_id,
910 int render_view_id, 910 int render_view_id,
911 net::CookieOptions* options) { 911 net::CookieOptions* options) {
912 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 912 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
913 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 913 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
914 CookieSettings* cookie_settings = io_data->GetCookieSettings(); 914 CookieSettings* cookie_settings = io_data->GetCookieSettings();
915 bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party); 915 bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party);
916 916
917 if (cookie_settings->IsCookieSessionOnly(url))
918 options->set_force_session();
919
920 BrowserThread::PostTask( 917 BrowserThread::PostTask(
921 BrowserThread::UI, FROM_HERE, 918 BrowserThread::UI, FROM_HERE,
922 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id, 919 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id,
923 render_view_id, url, first_party, cookie_line, *options, 920 render_view_id, url, first_party, cookie_line, *options,
924 !allow)); 921 !allow));
925 return allow; 922 return allow;
926 } 923 }
927 924
928 bool ChromeContentBrowserClient::AllowSaveLocalState( 925 bool ChromeContentBrowserClient::AllowSaveLocalState(
929 content::ResourceContext* context) { 926 content::ResourceContext* context) {
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 #if defined(USE_NSS) 1624 #if defined(USE_NSS)
1628 crypto::CryptoModuleBlockingPasswordDelegate* 1625 crypto::CryptoModuleBlockingPasswordDelegate*
1629 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1626 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1630 const GURL& url) { 1627 const GURL& url) {
1631 return browser::NewCryptoModuleBlockingDialogDelegate( 1628 return browser::NewCryptoModuleBlockingDialogDelegate(
1632 browser::kCryptoModulePasswordKeygen, url.host()); 1629 browser::kCryptoModulePasswordKeygen, url.host());
1633 } 1630 }
1634 #endif 1631 #endif
1635 1632
1636 } // namespace chrome 1633 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698