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

Unified Diff: chrome/browser/guest_view/web_view/web_view_guest.h

Issue 338353007: Implementation of shared worker code path for WebView file system permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_sharedworker
Patch Set: Rename + changes are made. Created 6 years, 6 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
Index: chrome/browser/guest_view/web_view/web_view_guest.h
diff --git a/chrome/browser/guest_view/web_view/web_view_guest.h b/chrome/browser/guest_view/web_view/web_view_guest.h
index 32defb5c87197e7ad491a23e44485151e5cb52e2..a273680f4acd4cc0d16c8def3ce354a53881978a 100644
--- a/chrome/browser/guest_view/web_view/web_view_guest.h
+++ b/chrome/browser/guest_view/web_view/web_view_guest.h
@@ -244,24 +244,8 @@ class WebViewGuest : public GuestView<WebViewGuest>,
}
// Called when file system access is requested by the guest content using the
- // asynchronous HTML5 file system API. The request is plumbed through the
- // <webview> permission request API. The request will be:
- // - Allowed if the embedder explicitly allowed it.
- // - Denied if the embedder explicitly denied.
- // - Determined by the guest's content settings if the embedder does not
- // perform an explicit action.
- // If access was blocked due to the page's content settings,
- // |blocked_by_policy| should be true, and this function should invoke
- // OnContentBlocked.
- static void FileSystemAccessedAsync(int render_process_id,
- int render_frame_id,
- int request_id,
- const GURL& url,
- bool blocked_by_policy);
-
- // Called when file system access is requested by the guest content using the
- // synchronous HTML5 file system API in a worker thread or shared worker. The
- // request is plumbed through the <webview> permission request API. The
+ // HTML5 file system API in main thread, or a worker thread or shared worker.
+ // The request is plumbed through the <webview> permission request API. The
// request will be:
// - Allowed if the embedder explicitly allowed it.
// - Denied if the embedder explicitly denied.
@@ -270,11 +254,11 @@ class WebViewGuest : public GuestView<WebViewGuest>,
// If access was blocked due to the page's content settings,
// |blocked_by_policy| should be true, and this function should invoke
// OnContentBlocked.
- static void FileSystemAccessedSync(int render_process_id,
- int render_frame_id,
- const GURL& url,
- bool blocked_by_policy,
- IPC::Message* reply_msg);
+ static void FileSystemAccessed(int render_process_id,
Xi Han 2014/06/23 20:43:34 Code clean up is done here: use the same code for
+ int render_frame_id,
+ const GURL& url,
+ bool blocked_by_policy,
+ base::Callback<void(bool)> callback);
private:
virtual ~WebViewGuest();
@@ -330,17 +314,12 @@ class WebViewGuest : public GuestView<WebViewGuest>,
bool allow,
const std::string& user_input);
- static void FileSystemAccessedAsyncResponse(int render_process_id,
- int render_frame_id,
- int request_id,
- const GURL& url,
- bool allowed);
-
- static void FileSystemAccessedSyncResponse(int render_process_id,
- int render_frame_id,
- const GURL& url,
- IPC::Message* reply_msg,
- bool allowed);
+ static void FileSystemAccessedResponse(
+ int render_process_id,
+ int render_frame_id,
+ const GURL& url,
+ base::Callback<void(bool)> callback,
+ bool allowed);
// WebContentsObserver implementation.
virtual void DidCommitProvisionalLoadForFrame(

Powered by Google App Engine
This is Rietveld 408576698