| 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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 const std::string& cookie_line, | 895 const std::string& cookie_line, |
| 896 content::ResourceContext* context, | 896 content::ResourceContext* context, |
| 897 int render_process_id, | 897 int render_process_id, |
| 898 int render_view_id, | 898 int render_view_id, |
| 899 net::CookieOptions* options) { | 899 net::CookieOptions* options) { |
| 900 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 900 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 901 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 901 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
| 902 CookieSettings* cookie_settings = io_data->GetCookieSettings(); | 902 CookieSettings* cookie_settings = io_data->GetCookieSettings(); |
| 903 bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party); | 903 bool allow = cookie_settings->IsSettingCookieAllowed(url, first_party); |
| 904 | 904 |
| 905 if (cookie_settings->IsCookieSessionOnly(url)) | |
| 906 options->set_force_session(); | |
| 907 | |
| 908 BrowserThread::PostTask( | 905 BrowserThread::PostTask( |
| 909 BrowserThread::UI, FROM_HERE, | 906 BrowserThread::UI, FROM_HERE, |
| 910 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id, | 907 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id, |
| 911 render_view_id, url, first_party, cookie_line, *options, | 908 render_view_id, url, first_party, cookie_line, *options, |
| 912 !allow)); | 909 !allow)); |
| 913 return allow; | 910 return allow; |
| 914 } | 911 } |
| 915 | 912 |
| 916 bool ChromeContentBrowserClient::AllowSaveLocalState( | 913 bool ChromeContentBrowserClient::AllowSaveLocalState( |
| 917 content::ResourceContext* context) { | 914 content::ResourceContext* context) { |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1615 #if defined(USE_NSS) | 1612 #if defined(USE_NSS) |
| 1616 crypto::CryptoModuleBlockingPasswordDelegate* | 1613 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1617 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1614 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1618 const GURL& url) { | 1615 const GURL& url) { |
| 1619 return browser::NewCryptoModuleBlockingDialogDelegate( | 1616 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1620 browser::kCryptoModulePasswordKeygen, url.host()); | 1617 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1621 } | 1618 } |
| 1622 #endif | 1619 #endif |
| 1623 | 1620 |
| 1624 } // namespace chrome | 1621 } // namespace chrome |
| OLD | NEW |