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

Side by Side Diff: base/file_util.h

Issue 2802018: Loosen permission on extension temp dir when a flag is used. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Rebase for commit. Created 10 years, 5 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
« no previous file with comments | « no previous file | base/file_util_posix.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file contains utility functions for dealing with the local 5 // This file contains utility functions for dealing with the local
6 // filesystem. 6 // filesystem.
7 7
8 #ifndef BASE_FILE_UTIL_H_ 8 #ifndef BASE_FILE_UTIL_H_
9 #define BASE_FILE_UTIL_H_ 9 #define BASE_FILE_UTIL_H_
10 10
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // Similar to CreateAndOpenTemporaryFile, but the file is created in |dir|. 258 // Similar to CreateAndOpenTemporaryFile, but the file is created in |dir|.
259 FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path); 259 FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path);
260 260
261 // Same as CreateTemporaryFile but the file is created in |dir|. 261 // Same as CreateTemporaryFile but the file is created in |dir|.
262 bool CreateTemporaryFileInDir(const FilePath& dir, 262 bool CreateTemporaryFileInDir(const FilePath& dir,
263 FilePath* temp_file); 263 FilePath* temp_file);
264 264
265 // Create a directory within another directory. 265 // Create a directory within another directory.
266 // Extra characters will be appended to |name_tmpl| to ensure that the 266 // Extra characters will be appended to |name_tmpl| to ensure that the
267 // new directory does not have the same name as an existing directory. 267 // new directory does not have the same name as an existing directory.
268 // If |loosen_permissions| is true, the new directory will be readable
269 // and writable to all users on windows. It is ignored on other platforms.
270 // |loosen_permissions| exists to allow debugging of crbug/35198, and will
271 // be removed when the issue is understood.
268 bool CreateTemporaryDirInDir(const FilePath& base_dir, 272 bool CreateTemporaryDirInDir(const FilePath& base_dir,
269 const FilePath::StringType& prefix, 273 const FilePath::StringType& prefix,
274 bool loosen_permissions,
270 FilePath* new_dir); 275 FilePath* new_dir);
271 276
272 // Create a new directory under TempPath. If prefix is provided, the new 277 // Create a new directory under TempPath. If prefix is provided, the new
273 // directory name is in the format of prefixyyyy. 278 // directory name is in the format of prefixyyyy.
274 // NOTE: prefix is ignored in the POSIX implementation. 279 // NOTE: prefix is ignored in the POSIX implementation.
275 // TODO(erikkay): is this OK? 280 // TODO(erikkay): is this OK?
276 // If success, return true and output the full path of the directory created. 281 // If success, return true and output the full path of the directory created.
277 bool CreateNewTempDirectory(const FilePath::StringType& prefix, 282 bool CreateNewTempDirectory(const FilePath::StringType& prefix,
278 FilePath* new_temp_path); 283 FilePath* new_temp_path);
279 284
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 603
599 #endif // UNIT_TEST 604 #endif // UNIT_TEST
600 605
601 } // namespace file_util 606 } // namespace file_util
602 607
603 // Deprecated functions have been moved to this separate header file, 608 // Deprecated functions have been moved to this separate header file,
604 // which must be included last after all the above definitions. 609 // which must be included last after all the above definitions.
605 #include "base/file_util_deprecated.h" 610 #include "base/file_util_deprecated.h"
606 611
607 #endif // BASE_FILE_UTIL_H_ 612 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698