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

Side by Side Diff: base/file_util_win.cc

Issue 7085005: Disallow links from being seen by the extensions via the fileapi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments incorporated. Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_util_posix.cc ('k') | webkit/fileapi/file_system_file_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <propvarutil.h> 8 #include <propvarutil.h>
9 #include <psapi.h> 9 #include <psapi.h>
10 #include <shellapi.h> 10 #include <shellapi.h>
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 } else { 695 } else {
696 LOG(WARNING) << "Failed to create directory " << full_path_str 696 LOG(WARNING) << "Failed to create directory " << full_path_str
697 << ", last error is " << error_code << "."; 697 << ", last error is " << error_code << ".";
698 return false; 698 return false;
699 } 699 }
700 } else { 700 } else {
701 return true; 701 return true;
702 } 702 }
703 } 703 }
704 704
705 // TODO(rkc): Work out if we want to handle NTFS junctions here or not, handle
706 // them if we do decide to.
707 bool IsLink(const FilePath& file_path) {
708 return false;
709 }
710
705 bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* results) { 711 bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* results) {
706 base::ThreadRestrictions::AssertIOAllowed(); 712 base::ThreadRestrictions::AssertIOAllowed();
707 713
708 WIN32_FILE_ATTRIBUTE_DATA attr; 714 WIN32_FILE_ATTRIBUTE_DATA attr;
709 if (!GetFileAttributesEx(file_path.value().c_str(), 715 if (!GetFileAttributesEx(file_path.value().c_str(),
710 GetFileExInfoStandard, &attr)) { 716 GetFileExInfoStandard, &attr)) {
711 return false; 717 return false;
712 } 718 }
713 719
714 ULARGE_INTEGER size; 720 ULARGE_INTEGER size;
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 uint8 unused = *(touch + offset); 1168 uint8 unused = *(touch + offset);
1163 offset += step_size; 1169 offset += step_size;
1164 } 1170 }
1165 FreeLibrary(dll_module); 1171 FreeLibrary(dll_module);
1166 } 1172 }
1167 1173
1168 return true; 1174 return true;
1169 } 1175 }
1170 1176
1171 } // namespace file_util 1177 } // namespace file_util
OLDNEW
« no previous file with comments | « base/file_util_posix.cc ('k') | webkit/fileapi/file_system_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698