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 b20deb0a966297935cc939a1e26e5ea42e3e06ee..ef7423737cf181e7884dd4a47071b5c854baa069 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -1879,10 +1879,11 @@ bool ChromeContentBrowserClient::AllowWorkerDatabase( |
return allow; |
} |
-bool ChromeContentBrowserClient::AllowWorkerFileSystem( |
+void ChromeContentBrowserClient::RequestWorkerFileSystemAccessSync( |
const GURL& url, |
content::ResourceContext* context, |
- const std::vector<std::pair<int, int> >& render_frames) { |
+ const std::vector<std::pair<int, int> >& render_frames, |
+ base::Callback<void(bool)> callback) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
CookieSettings* cookie_settings = io_data->GetCookieSettings(); |
@@ -1891,13 +1892,31 @@ bool ChromeContentBrowserClient::AllowWorkerFileSystem( |
// Record access to file system for potential display in UI. |
std::vector<std::pair<int, int> >::const_iterator i; |
for (i = render_frames.begin(); i != render_frames.end(); ++i) { |
+#if defined(ENABLE_EXTENSIONS) |
+ bool is_web_view_guest = |
+ ExtensionRendererState::GetInstance()->IsWebViewRenderer(i->first); |
+ if (is_web_view_guest) { |
+ BrowserThread::PostTask(BrowserThread::UI, |
+ FROM_HERE, |
+ base::Bind(&WebViewGuest::FileSystemAccessedSync, |
+ i->first, |
+ i->second, |
+ url, |
+ !allow, |
+ callback)); |
+ continue; |
+ } |
+#endif |
+ callback.Run(allow); |
BrowserThread::PostTask( |
- BrowserThread::UI, FROM_HERE, |
+ BrowserThread::UI, |
+ FROM_HERE, |
base::Bind(&TabSpecificContentSettings::FileSystemAccessed, |
- i->first, i->second, url, !allow)); |
+ i->first, |
+ i->second, |
+ url, |
+ !allow)); |
} |
- |
- return allow; |
} |
bool ChromeContentBrowserClient::AllowWorkerIndexedDB( |