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

Unified Diff: base/test/test_file_util_win.cc

Issue 2124373002: [PPAPI] Quarantine files that are writeable by a Pepper plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@consolidate-file-metadata
Patch Set: Address comments. Created 4 years 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
« no previous file with comments | « base/test/test_file_util.h ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_file_util_win.cc
diff --git a/base/test/test_file_util_win.cc b/base/test/test_file_util_win.cc
index 982a0420a3c83246fb8782a1c9cffc991415ea0b..c44657a5e98bc804cc9e57c688e560edd4c150c9 100644
--- a/base/test/test_file_util_win.cc
+++ b/base/test/test_file_util_win.cc
@@ -159,49 +159,6 @@ bool DenyFilePermission(const FilePath& path, DWORD permission) {
return rc == ERROR_SUCCESS;
}
-// Checks if the volume supports Alternate Data Streams. This is required for
-// the Zone Identifier implementation.
-bool VolumeSupportsADS(const FilePath& path) {
- wchar_t drive[MAX_PATH] = {0};
- wcscpy_s(drive, MAX_PATH, path.value().c_str());
-
- if (!PathStripToRootW(drive))
- return false;
-
- DWORD fs_flags = 0;
- if (!GetVolumeInformationW(drive, NULL, 0, 0, NULL, &fs_flags, NULL, 0))
- return false;
-
- if (fs_flags & FILE_NAMED_STREAMS)
- return true;
-
- return false;
-}
-
-// Return whether the ZoneIdentifier is correctly set to "Internet" (3)
-// Only returns a valid result when called from same process as the
-// one that (was supposed to have) set the zone identifier.
-bool HasInternetZoneIdentifier(const FilePath& full_path) {
- FilePath zone_path(full_path.value() + L":Zone.Identifier");
- std::string zone_path_contents;
- if (!ReadFileToString(zone_path, &zone_path_contents))
- return false;
-
- std::vector<std::string> lines = SplitString(
- zone_path_contents, "\n", TRIM_WHITESPACE, SPLIT_WANT_ALL);
- switch (lines.size()) {
- case 3:
- // optional empty line at end of file:
- if (!lines[2].empty())
- return false;
- // fall through:
- case 2:
- return lines[0] == "[ZoneTransfer]" && lines[1] == "ZoneId=3";
- default:
- return false;
- }
-}
-
bool MakeFileUnreadable(const FilePath& path) {
return DenyFilePermission(path, GENERIC_READ);
}
« no previous file with comments | « base/test/test_file_util.h ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698