0
Commit Graph

109 Commits

Author SHA1 Message Date
thestig@chromium.org
b2f28d2a17 Cleanup: Deprecate wstring version of file_util::CopyDirectory().
BUG=24672
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9484003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124819 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-03 01:54:35 +00:00
gbillock@chromium.org
d6407d725f Fix the CountFilesCreatedAfter test.
R=evan@chromium.org
BUG=46246
TEST=FileUtilTest.CountFilesCreatedAfter


Review URL: http://codereview.chromium.org/9419029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122443 0039d316-1c4b-4281-b951-d872f2087c98
2012-02-17 03:32:09 +00:00
evan@chromium.org
a67fc9e162 Flakiness cleanup: disable flaky tests under base/
See https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/fcec09fc659f39a6

BUG=46246,85930,10611,86494,95058,61589,25038

Review URL: https://chromiumcodereview.appspot.com/9386014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121782 0039d316-1c4b-4281-b951-d872f2087c98
2012-02-14 00:29:14 +00:00
skerner@chromium.org
71b7da7dbd Match whole path components in DevicePathToDriveLetterPath(). Add tests.
+rvargas, who understands the code
+brettw, who is in OWNERS

BUG=109577
TEST=FileUtilTest.DevicePathToDriveLetter


Review URL: http://codereview.chromium.org/9167004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117986 0039d316-1c4b-4281-b951-d872f2087c98
2012-01-17 22:44:31 +00:00
tedvessenes@gmail.com
a1b75b94f6 Change code in base (primarily unit tests) to use Sleep(TimeDelta).
BUG=108171
TEST=


Review URL: http://codereview.chromium.org/9055001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116065 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-31 22:53:51 +00:00
cpu@chromium.org
23b59d264f GetPlatformFileInfo was always never returning directory
- Because relational operators have higher precedence than bitwise operators

BUG=none
TEST=unittest included

Review URL: http://codereview.chromium.org/9004052

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115998 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-29 22:59:22 +00:00
mcgrathr@chromium.org
103dccfa28 Adaptively use temp dir instead of /dev/shm for executable shmem file on Linux
On some Linux systems, files from /dev/shm cannot have PROT_EXEC applied to
their mappings.  This depends on picayune setup details that vary between
distributions and kernels and could vary between installations.  So just
use an empirical test of whether it works or not, and fall back to using
generic temporary space instead of /dev/shm for the executable case if needed.

BUG= http://code.google.com/p/chromium/issues/detail?id=103377
TEST= SharedMemory.AnonymousExecutable with /dev/shm mounted noexec

R=mark@chromium.org

Review URL: http://codereview.chromium.org/8800025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113228 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-06 18:07:05 +00:00
michaelbai@chromium.org
aead7d3970 Fix the file_util_unittests.cc for Android
BUG=
TEST=


Review URL: http://codereview.chromium.org/8380022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107020 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-25 00:08:28 +00:00
skerner@chromium.org
7312f42a14 Update write checks for external extension file on mac.
BUG=100565
TEST=VerifyPathControlledByUserTest.*


Review URL: http://codereview.chromium.org/8318011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105923 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-17 21:30:29 +00:00
skerner@chromium.org
30fcaa494a Get gid of created folders from stat()ing the folders, not from getgid().
BUG=97876
TEST=VerifyPathControlledByUserTest.*

Review URL: http://codereview.chromium.org/8037014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102748 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-26 17:18:43 +00:00
thakis@chromium.org
f2f61161b4 Mark VerifyPathControlledByUserTest.* as FAILS_ on mac.
BUG=97876
TEST=none
TBR=skerner


Review URL: http://codereview.chromium.org/8036012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102662 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-24 21:44:53 +00:00
skerner@google.com
73e4c36f36 Add external extensions json source in proper mac location.
The old path will be deprecated once developers have migrated.

BUG=67203
TEST=FileUtilTest.IsPathControledByAdmin

Review URL: http://codereview.chromium.org/7718021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102274 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-22 14:47:18 +00:00
nsylvain@chromium.org
20960e074c Add a gyp flag to enable dcheck by default in release without
having the pass a flag. This will be used on the try bots.

BUG=96753
Review URL: http://codereview.chromium.org/7719007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102017 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-20 20:59:01 +00:00
tfarina@chromium.org
58b7c5a6c3 base: Rename FileEnumerator::FILE_TYPE to FileEnumerator::FileType.
enum types should be named using CamelCase as class and function names,
not using MACRO_STYLE.

BUG=None
TEST=None

R=evan@chromium.org

Review URL: http://codereview.chromium.org/7618037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96766 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-15 13:09:27 +00:00
shinyak@google.com
46470aab29 Removed wchat_t from Time::FromString.
Also, some of the test case are moved for pr_time_unittests to time_unittests.

BUG=77962
TEST=base_unittests:TimeTest.*


Review URL: http://codereview.chromium.org/7492063

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95207 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-03 05:28:10 +00:00
morrita@chromium.org
ce681a8b14 Revert 94426 - Removed wchat_t from Time::FromString.
Also, some of the test case are moved for pr_time_unittests to time_unitests.

BUG=77962
TEST=base_unittests:TimeTest.*


Review URL: http://codereview.chromium.org/7470038

TBR=shinyak@google.com
Review URL: http://codereview.chromium.org/7520021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94427 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-28 05:34:27 +00:00
shinyak@google.com
60527a34df Removed wchat_t from Time::FromString.
Also, some of the test case are moved for pr_time_unittests to time_unitests.

BUG=77962
TEST=base_unittests:TimeTest.*


Review URL: http://codereview.chromium.org/7470038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94426 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-28 04:53:17 +00:00
thakis@chromium.org
e078590661 Move scoped_temp_dir and scoped_native_library back from base/memory to base.
It looks like they got moved accidentally in http://codereview.chromium.org/6714032

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7048007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86010 0039d316-1c4b-4281-b951-d872f2087c98
2011-05-19 23:34:17 +00:00
maruel@chromium.org
916654128e Revert r83048 "Removed wchar_t from Time::FromString."
This causes regression on KeywordProviderTest.Edit on clang produced executable.

TBR=shinyak
BUG=
TEST=

Review URL: http://codereview.chromium.org/6893031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83055 0039d316-1c4b-4281-b951-d872f2087c98
2011-04-26 19:07:08 +00:00
shinyak@google.com
5086cfc86f Removed wchar_t from Time::FromString.
Also, some of the test case are moved from pr_time_unittests to time_unittests.


BUG=77962
TEST=base_unittests:TimeTest.*


Review URL: http://codereview.chromium.org/6903022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83048 0039d316-1c4b-4281-b951-d872f2087c98
2011-04-26 18:17:03 +00:00
levin@chromium.org
3b63f8f451 Move some files from base to base/memory.
raw_scoped_refptr_mismatch_checker.h
ref_counted.cc
ref_counted.h
ref_counted_memory.cc
ref_counted_memory.h
ref_counted_unittest.cc
scoped_callback_factory.h
scoped_comptr_win.h
scoped_handle.h
scoped_native_library.cc
scoped_native_library.h
scoped_native_library_unittest.cc
scoped_nsobject.h
scoped_open_process.h
scoped_ptr.h
scoped_ptr_unittest.cc
scoped_temp_dir.cc
scoped_temp_dir.h
scoped_temp_dir_unittest.cc
scoped_vector.h
singleton.h
singleton_objc.h
singleton_unittest.cc
linked_ptr.h
linked_ptr_unittest.cc
weak_ptr.cc
weak_ptr.h
weak_ptr_unittest.cc

BUG=None
TEST=Compile

Review URL: http://codereview.chromium.org/6714032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-28 01:54:15 +00:00
rvargas@google.com
76c551c6fe Base unit tests: Small fix for two incorrect utility
functions of file_util_unittests

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6747006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79454 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-25 20:49:54 +00:00
evan@chromium.org
8a205c0f53 FilePath: Remove much of ToWStringHack, adding a LossyDisplayName()
The reason we don't want a free conversion between FilePaths and Unicode
is that it can be lossy.  But when displaying a string to the user,
we're ok if it's lossy when we have no other option.

This change introduces a LossyDisplayName() method that returns a
string16, and converts many of the users of ToWStringHack to use it.

BUG=69467

Review URL: http://codereview.chromium.org/6246036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73840 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-04 20:41:33 +00:00
tfarina@chromium.org
b90d7e80c2 Reland "Remove base/scoped_handle_win.h."
Fixed the problem with rlz library. Now should be fine to land this again.

This reverts commit 3620d9501af7bff688862c54fdd60f7eb41797f3.

Original Review URL: http://codereview.chromium.org/6126002/

BUG=None
TEST=trybots

Review URL: http://codereview.chromium.org/6110005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70861 0039d316-1c4b-4281-b951-d872f2087c98
2011-01-09 16:32:20 +00:00
thakis@chromium.org
15d96941d9 Revert "Remove base/scoped_handle_win.h stub and fix up all callers to use the new location and namespace."
This reverts r 70795, it broke the build.

TBR=vandebo

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70802 0039d316-1c4b-4281-b951-d872f2087c98
2011-01-07 23:21:55 +00:00
tfarina@chromium.org
7d34040372 Remove base/scoped_handle_win.h stub and fix up all callers to use the new location and namespace.
BUG=None
TEST=trybots

Review URL: http://codereview.chromium.org/6126002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70795 0039d316-1c4b-4281-b951-d872f2087c98
2011-01-07 22:23:58 +00:00
tfarina@chromium.org
15e093c997 Use FilePath::DirName instead of the deprecated file_util::GetDirectoryFromPath.
Fix the callers and remove the deprecated function.

BUG=24672
TEST=trybots

Review URL: http://codereview.chromium.org/6111003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70705 0039d316-1c4b-4281-b951-d872f2087c98
2011-01-07 02:12:15 +00:00
tfarina@chromium.org
de34d5f905 base: Remove deprecated file_util::GetFilenameFromPath function.
BUG=24672
TEST=trybots

Review URL: http://codereview.chromium.org/6057010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70610 0039d316-1c4b-4281-b951-d872f2087c98
2011-01-06 12:07:59 +00:00
brettw@chromium.org
ce072a7181 Move platform_thread to base/threading and put in the base namespace. I left a
stub and "using" declarations in the old location to avoid having to change the
entire project at once.

TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/6001010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70342 0039d316-1c4b-4281-b951-d872f2087c98
2010-12-31 20:02:16 +00:00
gspencer@chromium.org
2e733d1071 Some additions to support symlinks better on platforms that support them.
BUG=none
TEST=Ran new unit test, passed trybots.

Review URL: http://codereview.chromium.org/5349007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67631 0039d316-1c4b-4281-b951-d872f2087c98
2010-11-30 00:43:37 +00:00
dumi@chromium.org
507fb9aa76 Add a TouchFile() function that takes a FilePath argument.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3496005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60381 0039d316-1c4b-4281-b951-d872f2087c98
2010-09-23 23:28:22 +00:00
maruel@chromium.org
8d60757991 Revert "Add a TouchFile function that operates on FilePaths + fixing a bug"
This reverts commit 60322.

TBR=dumi
TEST=none
BUG=none

Review URL: http://codereview.chromium.org/3439019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60327 0039d316-1c4b-4281-b951-d872f2087c98
2010-09-23 19:39:10 +00:00
dumi@chromium.org
b82ff7e829 Add a TouchFile function that operates on FilePaths + fixing a bug
related to FILE_WRITE_ATTRIBUTES on Windows.

BUG=none
TEST=FileUtilTest::TouchFile

Review URL: http://codereview.chromium.org/3404018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60322 0039d316-1c4b-4281-b951-d872f2087c98
2010-09-23 19:13:40 +00:00
phajdan.jr@chromium.org
90314c0a8e GTTF: Fix FileUtilTest so multiple test instances can run in parallel.
BUG=54098
TEST=base_unittests

Review URL: http://codereview.chromium.org/3444003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59548 0039d316-1c4b-4281-b951-d872f2087c98
2010-09-15 20:40:47 +00:00
dumi@chromium.org
2f0193c279 Moving file_util::FileInfo to base::PlatformFileInfo, and adding the
last_accessed and creation_time fields.

BUG=none
TEST=none


Review URL: http://codereview.chromium.org/3347005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58454 0039d316-1c4b-4281-b951-d872f2087c98
2010-09-03 02:28:37 +00:00
thestig@chromium.org
1407b6eecf FBTF: Remove unneeded headers from base/ (part 7)
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3176026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57737 0039d316-1c4b-4281-b951-d872f2087c98
2010-08-27 21:39:48 +00:00
viettrungluu@chromium.org
e7afe2458e Spelling correction: "nonexistant" -> "nonexistent".
BUG=none
TEST=good spellers are slightly happier

Review URL: http://codereview.chromium.org/3143037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57020 0039d316-1c4b-4281-b951-d872f2087c98
2010-08-22 16:19:13 +00:00
tfarina@chromium.org
e5d5383b10 Get rid of the deprecated file_util::InsertBeforeExtension.
BUG=None
TEST=trybots

Review URL: http://codereview.chromium.org/3161018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56477 0039d316-1c4b-4281-b951-d872f2087c98
2010-08-18 02:49:46 +00:00
skerner@chromium.org
094f97627b Fix incorect tests against INVALID_FILE_HANDLE, as pointed out by cpu on chrome-team.
BUG=NONE
TEST=FileUtilTest.NormalizeFilePath*

Review URL: http://codereview.chromium.org/3031041

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54701 0039d316-1c4b-4281-b951-d872f2087c98
2010-08-03 03:51:56 +00:00
skerner@chromium.org
bd781d897e Remove some debug switches:
--issue35198-crxdir-browser
--issue35198-permission

They were used to understand issue 35198.  They are no longer needed.  There is one more switch, --issue35198-logging, that is not being removed in this CL.  The logging it adds may still be useful.

BUG=50604
TEST=manual

Review URL: http://codereview.chromium.org/3052023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54323 0039d316-1c4b-4281-b951-d872f2087c98
2010-07-30 15:33:28 +00:00
erg@google.com
f3b1afd587 Remove <iostream> where possible.
<iostream> creates a static initializer. Most people don't need <iostream>
anyway--they really  need <ostream> for operator<< overloads. <iostream>
should *never* be included in a header file; <iosfwd> exists for that purpose.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3014015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53083 0039d316-1c4b-4281-b951-d872f2087c98
2010-07-20 20:08:23 +00:00
evan@chromium.org
63597e4ebc Deprecate most of the remaining wstring file_util functions.
These still exist on Windows due to being used by the installer,
but by moving them into the Windows-only block we prevent them
from being used in new code.  (I am already finding new code using
some of these!  I am glad to be rid of them.)

BUG=24672

Review URL: http://codereview.chromium.org/2850042

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51862 0039d316-1c4b-4281-b951-d872f2087c98
2010-07-08 17:49:05 +00:00
evan@chromium.org
8d19c7d3c2 Deprecate more old filepath functions.
These still exist on Windows due to being used by the installer,
but by moving them into the Windows-only block we prevent them
from being used in new code.

BUG=24672

Review URL: http://codereview.chromium.org/2861042

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51453 0039d316-1c4b-4281-b951-d872f2087c98
2010-07-01 23:19:02 +00:00
skerner@chromium.org
4cd2d520d9 Loosen permission on extension temp dir when a flag is used.
Issue 35198 can not be reproduced locally.  To enable users to do experiments, three command line flags are added to chrome:

--issue35198-crxdir-browser: Have the browser process create the directory in which the extension will be unzipped.

--issue35198-logging: Enable log messages from directory creation in the utility process to be moved to the browser process.

--issue35198-permission: Use the most permissive file permissions possible on the extension unpack directory.

BUG=35198
TEST=manual

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=51231

Review URL: http://codereview.chromium.org/2802018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51416 0039d316-1c4b-4281-b951-d872f2087c98
2010-07-01 20:24:09 +00:00
skerner@chromium.org
046062e821 Revert 51231 - Loosen permission on extension temp dir when a flag is used.
Issue 35198 can not be reproduced locally.  To enable users to do experiments, three command line flags are added to chrome:

--issue35198-crxdir-browser: Have the browser process create the directory in which the extension will be unzipped.

--issue35198-logging: Enable log messages from directory creation in the utility process to be moved to the browser process.

--issue35198-permission: Use the most permissive file permissions possible on the extension unpack directory.

BUG=35198
TEST=manual

Review URL: http://codereview.chromium.org/2802018

TBR=skerner@chromium.org
Review URL: http://codereview.chromium.org/2861039

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51238 0039d316-1c4b-4281-b951-d872f2087c98
2010-06-30 07:19:11 +00:00
skerner@chromium.org
cadb40bdf4 Loosen permission on extension temp dir when a flag is used.
Issue 35198 can not be reproduced locally.  To enable users to do experiments, three command line flags are added to chrome:

--issue35198-crxdir-browser: Have the browser process create the directory in which the extension will be unzipped.

--issue35198-logging: Enable log messages from directory creation in the utility process to be moved to the browser process.

--issue35198-permission: Use the most permissive file permissions possible on the extension unpack directory.

BUG=35198
TEST=manual

Review URL: http://codereview.chromium.org/2802018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51231 0039d316-1c4b-4281-b951-d872f2087c98
2010-06-30 05:57:37 +00:00
rvargas@google.com
a04876b90c Add histograms to track the size of the profile data.
BUG=16705
TEST=FileUtilTest.FileAndDirectorySize


Review URL: http://codereview.chromium.org/2778006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49606 0039d316-1c4b-4281-b951-d872f2087c98
2010-06-11 22:53:43 +00:00
glider@chromium.org
2ec79f7df2 Minor comment fix.
TBR=phajdan.jr
BUG=46246

Review URL: http://codereview.chromium.org/2735009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49389 0039d316-1c4b-4281-b951-d872f2087c98
2010-06-10 13:05:26 +00:00
glider@chromium.org
552b315fe6 Mark FileUtilTest.CountFilesCreatedAfter as flaky
TBR=erikkay
BUG=46246

Review URL: http://codereview.chromium.org/2756007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49386 0039d316-1c4b-4281-b951-d872f2087c98
2010-06-10 12:40:52 +00:00
skerner@chromium.org
6f5f4322d6 Give the extension unpacker process a junction/symlink free path to the unpack directory.
BUG=35198,13044
TEST=FileUtilTest.NormalizeFilePathBasic,FileUtilTest. NormalizeFilePathReparsePoints,FileUtilTest.NormalizeFilePathSymlinks

Review URL: http://codereview.chromium.org/2088006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49337 0039d316-1c4b-4281-b951-d872f2087c98
2010-06-09 22:56:48 +00:00