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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
943 for (i = render_views.begin(); i != render_views.end(); ++i) { | 943 for (i = render_views.begin(); i != render_views.end(); ++i) { |
944 BrowserThread::PostTask( | 944 BrowserThread::PostTask( |
945 BrowserThread::UI, FROM_HERE, | 945 BrowserThread::UI, FROM_HERE, |
946 base::Bind(&TabSpecificContentSettings::FileSystemAccessed, | 946 base::Bind(&TabSpecificContentSettings::FileSystemAccessed, |
947 i->first, i->second, url, !allow)); | 947 i->first, i->second, url, !allow)); |
948 } | 948 } |
949 | 949 |
950 return allow; | 950 return allow; |
951 } | 951 } |
952 | 952 |
953 bool ChromeContentBrowserClient::AllowWorkerIndexedDB( | |
954 const GURL& url, | |
955 const string16& name, | |
956 content::ResourceContext* context, | |
957 const std::vector<std::pair<int, int> >& render_views) { | |
958 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | |
959 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | |
960 CookieSettings* cookie_settings = io_data->GetCookieSettings(); | |
961 bool allow = cookie_settings->IsSettingCookieAllowed(url, url); | |
962 | |
963 // Record access to file system for potential display in UI. | |
michaeln
2012/03/01 20:46:08
comment should say "indexed db"
dgrogan
2012/03/02 00:41:11
Done.
| |
964 std::vector<std::pair<int, int> >::const_iterator i; | |
965 for (i = render_views.begin(); i != render_views.end(); ++i) { | |
966 BrowserThread::PostTask( | |
967 BrowserThread::UI, FROM_HERE, | |
968 base::Bind(&TabSpecificContentSettings::IndexedDBAccessed, | |
969 i->first, i->second, url, name, !allow)); | |
970 } | |
971 | |
972 return allow; | |
973 } | |
974 | |
953 net::URLRequestContext* | 975 net::URLRequestContext* |
954 ChromeContentBrowserClient::OverrideRequestContextForURL( | 976 ChromeContentBrowserClient::OverrideRequestContextForURL( |
955 const GURL& url, content::ResourceContext* context) { | 977 const GURL& url, content::ResourceContext* context) { |
956 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 978 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
957 if (url.SchemeIs(chrome::kExtensionScheme)) { | 979 if (url.SchemeIs(chrome::kExtensionScheme)) { |
958 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 980 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
959 return io_data->extensions_request_context(); | 981 return io_data->extensions_request_context(); |
960 } | 982 } |
961 | 983 |
962 return NULL; | 984 return NULL; |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1534 #if defined(USE_NSS) | 1556 #if defined(USE_NSS) |
1535 crypto::CryptoModuleBlockingPasswordDelegate* | 1557 crypto::CryptoModuleBlockingPasswordDelegate* |
1536 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1558 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
1537 const GURL& url) { | 1559 const GURL& url) { |
1538 return browser::NewCryptoModuleBlockingDialogDelegate( | 1560 return browser::NewCryptoModuleBlockingDialogDelegate( |
1539 browser::kCryptoModulePasswordKeygen, url.host()); | 1561 browser::kCryptoModulePasswordKeygen, url.host()); |
1540 } | 1562 } |
1541 #endif | 1563 #endif |
1542 | 1564 |
1543 } // namespace chrome | 1565 } // namespace chrome |
OLD | NEW |