| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |