From c42de73d768e53ea90903357ced6ef6001fb7b2f Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Sat, 16 Feb 2013 06:26:31 +0000 Subject: Replace all FilePath with base::FilePath in content. This is im preparation for removing the 'using" in file_path.h Review URL: https://codereview.chromium.org/12226120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182940 0039d316-1c4b-4281-b951-d872f2087c98 --- .../child_process_security_policy_unittest.cc | 22 ++++++++++++---------- content/browser/download/file_metadata_mac.mm | 2 +- .../pepper/pepper_flash_file_message_filter.h | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) (limited to 'content/browser') diff --git a/content/browser/child_process_security_policy_unittest.cc b/content/browser/child_process_security_policy_unittest.cc index 2a6a381..da56188 100644 --- a/content/browser/child_process_security_policy_unittest.cc +++ b/content/browser/child_process_security_policy_unittest.cc @@ -354,20 +354,22 @@ TEST_F(ChildProcessSecurityPolicyTest, CanReadDirectories) { } TEST_F(ChildProcessSecurityPolicyTest, FilePermissions) { - base::FilePath granted_file = FilePath(TEST_PATH("/home/joe")); - base::FilePath sibling_file = FilePath(TEST_PATH("/home/bob")); - base::FilePath child_file = FilePath(TEST_PATH("/home/joe/file")); - base::FilePath parent_file = FilePath(TEST_PATH("/home")); - base::FilePath parent_slash_file = FilePath(TEST_PATH("/home/")); - base::FilePath child_traversal1 = FilePath(TEST_PATH("/home/joe/././file")); - base::FilePath child_traversal2 = FilePath( + base::FilePath granted_file = base::FilePath(TEST_PATH("/home/joe")); + base::FilePath sibling_file = base::FilePath(TEST_PATH("/home/bob")); + base::FilePath child_file = base::FilePath(TEST_PATH("/home/joe/file")); + base::FilePath parent_file = base::FilePath(TEST_PATH("/home")); + base::FilePath parent_slash_file = base::FilePath(TEST_PATH("/home/")); + base::FilePath child_traversal1 = + base::FilePath(TEST_PATH("/home/joe/././file")); + base::FilePath child_traversal2 = base::FilePath( TEST_PATH("/home/joe/file/../otherfile")); base::FilePath evil_traversal1 = FilePath(TEST_PATH("/home/joe/../../etc/passwd")); - base::FilePath evil_traversal2 = FilePath( + base::FilePath evil_traversal2 = base::FilePath( TEST_PATH("/home/joe/./.././../etc/passwd")); - base::FilePath self_traversal = FilePath(TEST_PATH("/home/joe/../joe/file")); - base::FilePath relative_file = FilePath(FILE_PATH_LITERAL("home/joe")); + base::FilePath self_traversal = + base::FilePath(TEST_PATH("/home/joe/../joe/file")); + base::FilePath relative_file = base::FilePath(FILE_PATH_LITERAL("home/joe")); ChildProcessSecurityPolicyImpl* p = ChildProcessSecurityPolicyImpl::GetInstance(); diff --git a/content/browser/download/file_metadata_mac.mm b/content/browser/download/file_metadata_mac.mm index d16edf2..0a45cdb 100644 --- a/content/browser/download/file_metadata_mac.mm +++ b/content/browser/download/file_metadata_mac.mm @@ -96,7 +96,7 @@ void AddOriginMetadataToFile(const base::FilePath& file, const GURL& source, // LSFileQuarantineEnabled entry in our Info.plist, but it knows relatively // little about the files. We add more information about the download to // improve the UI shown by the OS when the users tries to open the file. -void AddQuarantineMetadataToFile(const FilePath& file, const GURL& source, +void AddQuarantineMetadataToFile(const base::FilePath& file, const GURL& source, const GURL& referrer) { FSRef file_ref; if (!base::mac::FSRefFromPath(file.value(), &file_ref)) diff --git a/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h b/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h index 3845528..7863680 100644 --- a/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h +++ b/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h @@ -70,7 +70,7 @@ class PepperFlashFileMessageFilter : public ppapi::host::ResourceMessageFilter { const ppapi::PepperFilePath& pepper_path, int flags); - FilePath plugin_data_directory_; + base::FilePath plugin_data_directory_; int render_process_id_; base::ProcessHandle plugin_process_handle_; -- cgit v1.1