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

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: sync to ToT and fix comment 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 d1e0b5ce1fb8ba27beb4b2b557a50e3773080c20..ef6ef22443916bfccd4a0b0c8ac9c0fdd3ac97ac 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 IndexedDB for potential display in UI.
+ 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