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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.h

Issue 306473012: Plumb file system permission into WebviewGuest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix worker Created 6 years, 7 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/content_settings/tab_specific_content_settings.h
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h
index 063faa95fe36c2409d6d0d5dd24e9084cb363de0..fd7f1670c4ee16d9ce20d46b8785079098036a61 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.h
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h
@@ -13,6 +13,7 @@
#include "base/observer_list.h"
#include "chrome/browser/content_settings/content_settings_usages_state.h"
#include "chrome/browser/content_settings/local_shared_objects_container.h"
+#include "chrome/browser/guest_view/web_view/web_view_guest.h"
#include "chrome/browser/media/media_stream_devices_controller.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
@@ -28,6 +29,7 @@ class CookiesTreeModel;
class Profile;
namespace content {
+class RenderFrameHost;
class RenderViewHost;
}
@@ -154,10 +156,37 @@ class TabSpecificContentSettings
// If access was blocked due to the user's content settings,
// |blocked_by_policy| should be true, and this function should invoke
// OnContentBlocked.
- static void FileSystemAccessed(int render_process_id,
- int render_frame_id,
- const GURL& url,
- bool blocked_by_policy);
+ static void FileSystemAccessedSync(int render_process_id,
+ int render_frame_id,
+ const GURL& url,
+ bool blocked_by_policy);
+
+ // Called when a specific file system in the current page was accessed.
+ // If access was blocked due to the user's content settings,
+ // |blocked_by_policy| should be true, and this function should invoke
+ // OnContentBlocked.
+ static void FileSystemAccessedSyncDelayReply(int render_process_id,
+ int render_frame_id,
+ const GURL& url,
+ IPC::Message* reply_msg,
+ bool blocked_by_policy);
+
+ // Called when a specific file system in the current page was accessed.
+ // If access was blocked due to the user'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);
+
+ static void UpdateSettingsOnFileSystemAccessedDelayReply(
+ int render_process_id,
+ int render_frame_id,
+ const GURL& url,
+ IPC::Message* message,
+ bool blocked_by_policy);
// Resets the |content_blocked_| and |content_allowed_| arrays, except for
// CONTENT_SETTINGS_TYPE_COOKIES related information.
@@ -365,6 +394,19 @@ class TabSpecificContentSettings
// Notifies all registered |SiteDataObserver|s.
void NotifySiteDataObservers();
+ static void FileSystemAccessedInternal(int render_process_id,
+ int render_frame_id,
+ int request_id,
+ const GURL& url,
+ bool blocked_by_policy);
+ static WebViewGuest* GetWebViewGuest(
+ content::RenderFrameHost* render_frame_host);
+ static void FileSystemAccessedAsyncInternal(int render_process_id,
+ int render_frame_id,
+ int request_id,
+ const GURL& url,
+ bool blocked_by_policy);
+
// All currently registered |SiteDataObserver|s.
ObserverList<SiteDataObserver> observer_list_;

Powered by Google App Engine
This is Rietveld 408576698