Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 9557009: IndexedDB: chrome-side changes for permission check from shared worker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move test to separate CL Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 2bcd9b9a874343d7e639d10bf2ae1089bffb4b47..3e0c66ad425ecfef611132aa260de0aa492656f9 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -950,6 +950,28 @@ bool ChromeContentBrowserClient::AllowWorkerFileSystem(
return allow;
}
+bool ChromeContentBrowserClient::AllowWorkerIndexedDB(
+ const GURL& url,
+ const string16& name,
+ content::ResourceContext* context,
+ const std::vector<std::pair<int, int> >& render_views) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
+ CookieSettings* cookie_settings = io_data->GetCookieSettings();
+ bool allow = cookie_settings->IsSettingCookieAllowed(url, url);
+
+ // 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.
+ std::vector<std::pair<int, int> >::const_iterator i;
+ for (i = render_views.begin(); i != render_views.end(); ++i) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
+ base::Bind(&TabSpecificContentSettings::IndexedDBAccessed,
+ i->first, i->second, url, name, !allow));
+ }
+
+ return allow;
+}
+
net::URLRequestContext*
ChromeContentBrowserClient::OverrideRequestContextForURL(
const GURL& url, content::ResourceContext* context) {
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698