| 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 const std::string& cookie_line, | 908 const std::string& cookie_line, |
| 909 content::ResourceContext* context, | 909 content::ResourceContext* context, |
| 910 int render_process_id, | 910 int render_process_id, |
| 911 int render_view_id, | 911 int render_view_id, |
| 912 net::CookieOptions* options) { | 912 net::CookieOptions* options) { |
| 913 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 913 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 914 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 914 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
| 915 CookieSettings* cookie_settings = io_data->GetCookieSettings(); | 915 CookieSettings* cookie_settings = io_data->GetCookieSettings(); |
| 916 bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party); | 916 bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party); |
| 917 | 917 |
| 918 if (cookie_settings->IsCookieSessionOnly(url)) | |
| 919 options->set_force_session(); | |
| 920 | |
| 921 BrowserThread::PostTask( | 918 BrowserThread::PostTask( |
| 922 BrowserThread::UI, FROM_HERE, | 919 BrowserThread::UI, FROM_HERE, |
| 923 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id, | 920 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id, |
| 924 render_view_id, url, first_party, cookie_line, *options, | 921 render_view_id, url, first_party, cookie_line, *options, |
| 925 !allow)); | 922 !allow)); |
| 926 return allow; | 923 return allow; |
| 927 } | 924 } |
| 928 | 925 |
| 929 bool ChromeContentBrowserClient::AllowSaveLocalState( | 926 bool ChromeContentBrowserClient::AllowSaveLocalState( |
| 930 content::ResourceContext* context) { | 927 content::ResourceContext* context) { |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 #if defined(USE_NSS) | 1625 #if defined(USE_NSS) |
| 1629 crypto::CryptoModuleBlockingPasswordDelegate* | 1626 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1630 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1627 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1631 const GURL& url) { | 1628 const GURL& url) { |
| 1632 return browser::NewCryptoModuleBlockingDialogDelegate( | 1629 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1633 browser::kCryptoModulePasswordKeygen, url.host()); | 1630 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1634 } | 1631 } |
| 1635 #endif | 1632 #endif |
| 1636 | 1633 |
| 1637 } // namespace chrome | 1634 } // namespace chrome |
| OLD | NEW |