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 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id, | 907 base::Bind(&TabSpecificContentSettings::CookieChanged, render_process_id, |
908 render_view_id, url, first_party, cookie_line, *options, | 908 render_view_id, url, first_party, cookie_line, *options, |
909 !allow)); | 909 !allow)); |
910 return allow; | 910 return allow; |
911 } | 911 } |
912 | 912 |
913 bool ChromeContentBrowserClient::AllowSaveLocalState( | 913 bool ChromeContentBrowserClient::AllowSaveLocalState( |
914 content::ResourceContext* context) { | 914 content::ResourceContext* context) { |
915 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 915 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
916 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 916 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
917 CookieSettings* cookie_settings = io_data->GetCookieSettings(); | |
918 ContentSetting setting = cookie_settings->GetDefaultCookieSetting(NULL); | |
Bernhard Bauer
2012/05/31 16:08:17
Ooh, now that we're hooking this up to content set
jochen (gone - plz use gerrit)
2012/06/01 12:15:19
Done.
| |
917 | 919 |
918 return !io_data->clear_local_state_on_exit()->GetValue(); | 920 return setting != CONTENT_SETTING_SESSION_ONLY; |
marja
2012/05/31 15:30:32
What if the default setting is .._BLOCK?
jochen (gone - plz use gerrit)
2012/05/31 15:54:41
It's a bug that this doesn't keep flash from savin
| |
919 } | 921 } |
920 | 922 |
921 bool ChromeContentBrowserClient::AllowWorkerDatabase( | 923 bool ChromeContentBrowserClient::AllowWorkerDatabase( |
922 const GURL& url, | 924 const GURL& url, |
923 const string16& name, | 925 const string16& name, |
924 const string16& display_name, | 926 const string16& display_name, |
925 unsigned long estimated_size, | 927 unsigned long estimated_size, |
926 content::ResourceContext* context, | 928 content::ResourceContext* context, |
927 const std::vector<std::pair<int, int> >& render_views) { | 929 const std::vector<std::pair<int, int> >& render_views) { |
928 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 930 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1614 #if defined(USE_NSS) | 1616 #if defined(USE_NSS) |
1615 crypto::CryptoModuleBlockingPasswordDelegate* | 1617 crypto::CryptoModuleBlockingPasswordDelegate* |
1616 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1618 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
1617 const GURL& url) { | 1619 const GURL& url) { |
1618 return browser::NewCryptoModuleBlockingDialogDelegate( | 1620 return browser::NewCryptoModuleBlockingDialogDelegate( |
1619 browser::kCryptoModulePasswordKeygen, url.host()); | 1621 browser::kCryptoModulePasswordKeygen, url.host()); |
1620 } | 1622 } |
1621 #endif | 1623 #endif |
1622 | 1624 |
1623 } // namespace chrome | 1625 } // namespace chrome |
OLD | NEW |