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

Unified Diff: chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h

Issue 15521002: Flag and whitelist to allow crxfs api in NaCl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ifdef Created 7 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/renderer_host/pepper/pepper_crx_file_system_message_filter.h
diff --git a/chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h
index 53669e15c076f211bd83980a2a0cd4601a6877d6..b970d119045d79cf6941c63ca692a57f15b79432 100644
--- a/chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h
+++ b/chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_
#define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_
+#include <set>
#include <string>
#include "base/files/file_path.h"
@@ -14,6 +15,8 @@
#include "ppapi/host/resource_host.h"
#include "ppapi/host/resource_message_filter.h"
+class Profile;
+
namespace content {
class BrowserPpapiHost;
}
@@ -48,10 +51,12 @@ class PepperCrxFileSystemMessageFilter
virtual ~PepperCrxFileSystemMessageFilter();
+ Profile* GetProfile();
+
// Returns filesystem id of isolated filesystem if valid, or empty string
// otherwise. This must run on the UI thread because ProfileManager only
// allows access on that thread.
- std::string CreateIsolatedFileSystem();
+ std::string CreateIsolatedFileSystem(Profile* profile);
int32_t OnOpenFileSystem(ppapi::host::HostMessageContext* context);
@@ -59,6 +64,9 @@ class PepperCrxFileSystemMessageFilter
const base::FilePath& profile_directory_;
const GURL document_url_;
+ // Set of origins that can use CrxFs private APIs from NaCl.
+ std::set<std::string> allowed_crxfs_origins_;
+
DISALLOW_COPY_AND_ASSIGN(PepperCrxFileSystemMessageFilter);
};

Powered by Google App Engine
This is Rietveld 408576698