Index: content/browser/child_process_security_policy_unittest.cc |
diff --git a/content/browser/child_process_security_policy_unittest.cc b/content/browser/child_process_security_policy_unittest.cc |
index 4d0dc9d10ac3b03db7f15b82e1a65c355b834ad9..1cb7086b039c322ab0152b61c2766cc0340c012e 100644 |
--- a/content/browser/child_process_security_policy_unittest.cc |
+++ b/content/browser/child_process_security_policy_unittest.cc |
@@ -78,6 +78,13 @@ class ChildProcessSecurityPolicyTest : public testing::Test { |
test_browser_client_.AddScheme(scheme); |
} |
+ void GrantPermissionsForFile(ChildProcessSecurityPolicyImpl* p, |
+ int child_id, |
+ const base::FilePath& file, |
+ int permissions) { |
+ p->GrantPermissionsForFile(child_id, file, permissions); |
+ } |
+ |
private: |
ChildProcessSecurityPolicyTestBrowserClient test_browser_client_; |
ContentBrowserClient* old_browser_client_; |
@@ -356,7 +363,7 @@ TEST_F(ChildProcessSecurityPolicyTest, FilePermissions) { |
EXPECT_FALSE(p->HasPermissionsForFile(kRendererID, granted_file, |
base::PLATFORM_FILE_OPEN)); |
- p->GrantPermissionsForFile(kRendererID, granted_file, |
+ GrantPermissionsForFile(p, kRendererID, granted_file, |
base::PLATFORM_FILE_OPEN | |
base::PLATFORM_FILE_OPEN_TRUNCATED | |
base::PLATFORM_FILE_READ | |
@@ -408,7 +415,7 @@ TEST_F(ChildProcessSecurityPolicyTest, FilePermissions) { |
p->Add(kRendererID); |
EXPECT_FALSE(p->HasPermissionsForFile(kRendererID, granted_file, |
base::PLATFORM_FILE_OPEN)); |
- p->GrantPermissionsForFile(kRendererID, parent_file, |
+ GrantPermissionsForFile(p, kRendererID, parent_file, |
base::PLATFORM_FILE_OPEN | |
base::PLATFORM_FILE_READ); |
EXPECT_TRUE(p->HasPermissionsForFile(kRendererID, granted_file, |
@@ -422,7 +429,7 @@ TEST_F(ChildProcessSecurityPolicyTest, FilePermissions) { |
p->Add(kRendererID); |
EXPECT_FALSE(p->HasPermissionsForFile(kRendererID, granted_file, |
base::PLATFORM_FILE_OPEN)); |
- p->GrantPermissionsForFile(kRendererID, parent_slash_file, |
+ GrantPermissionsForFile(p, kRendererID, parent_slash_file, |
base::PLATFORM_FILE_OPEN | |
base::PLATFORM_FILE_READ); |
EXPECT_TRUE(p->HasPermissionsForFile(kRendererID, granted_file, |
@@ -433,7 +440,7 @@ TEST_F(ChildProcessSecurityPolicyTest, FilePermissions) { |
// Grant permissions for the file (should overwrite the permissions granted |
// for the directory). |
- p->GrantPermissionsForFile(kRendererID, granted_file, |
+ GrantPermissionsForFile(p, kRendererID, granted_file, |
base::PLATFORM_FILE_TEMPORARY); |
EXPECT_FALSE(p->HasPermissionsForFile(kRendererID, granted_file, |
base::PLATFORM_FILE_OPEN)); |
@@ -453,7 +460,7 @@ TEST_F(ChildProcessSecurityPolicyTest, FilePermissions) { |
// Grant file permissions for the file to main thread renderer process, |
// make sure its worker thread renderer process inherits those. |
p->Add(kRendererID); |
- p->GrantPermissionsForFile(kRendererID, granted_file, |
+ GrantPermissionsForFile(p, kRendererID, granted_file, |
base::PLATFORM_FILE_OPEN | |
base::PLATFORM_FILE_READ); |
EXPECT_TRUE(p->HasPermissionsForFile(kRendererID, granted_file, |
@@ -474,7 +481,7 @@ TEST_F(ChildProcessSecurityPolicyTest, FilePermissions) { |
p->Remove(kWorkerRendererID); |
p->Add(kRendererID); |
- p->GrantPermissionsForFile(kRendererID, relative_file, |
+ GrantPermissionsForFile(p, kRendererID, relative_file, |
base::PLATFORM_FILE_OPEN); |
EXPECT_FALSE(p->HasPermissionsForFile(kRendererID, relative_file, |
base::PLATFORM_FILE_OPEN)); |