| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
BUG=108724
TEST=NONE
Review URL: https://codereview.chromium.org/24235010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227866 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://codereview.chromium.org/19579005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220612 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://chromiumcodereview.appspot.com/21943002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215539 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Also renames DeleteAfterReboot to DeleteFileAfterReboot, and removes FileUtilProxy::RecursiveDelete which was never called.
BUG=
R=shess@chromium.org
Review URL: https://codereview.chromium.org/18584011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211822 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
to the base namespace.
TBR=sky
Review URL: https://codereview.chromium.org/19052005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211675 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/18286004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211147 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This also creates a new base::internal namespace in file_util and I moved some of the internal functions in file_util to there.
BUG=
TBR=jam
Review URL: https://codereview.chromium.org/18332014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210600 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename ReplaceFileAndGetError (only used once) to ReplaceFile (used 5 times) and have each of those callers specify NULL for the output error if they don't care.
Remove InsertBeforeExtension from file_util.cc which seems to be unused.
BUG=
Review URL: https://codereview.chromium.org/18383003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209532 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://codereview.chromium.org/16950028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209475 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=
TBR=tfarina
Review URL: https://chromiumcodereview.appspot.com/16950027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208091 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=247723
TEST=none
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/16745002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205530 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make use of the new error code in IndexedDB, where we'll
histogram which errors can be recovered from by retrying
and which can't.
We're going to try retrying CreateDirectory because LevelDB
doesn't pay attention to what env_->CreateDir returns and a
frequent error on the next operation (locking the lock file)
is that the directory doesn't exist. I want to find out
what's causing the directories to not be created in the
first place, and which errors can be considered ephemeral.
BUG=225051
Review URL: https://chromiumcodereview.appspot.com/15812007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205386 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It creates a class FileInfo to contain the details rather than using a platform-specific typedef. This allows the accessors GetName, GetSize, etc. to be moved directly to this class (previously they were static helpers on the FileEnumerator class) which makes a bunch of code much cleaner. It also gives reasonable getting and initialization which the previous version lacked.
BUG=175002
Reland of 198820 and 298824
Original review = https://codereview.chromium.org/13165005
R=rvargas@chromium.org
Review URL: https://codereview.chromium.org/16392011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205019 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It currently just returns true/false to indicate success.
More information to diagnose and log failures would be
helpful in IndexedDB.
This patch also logs the new error when ReplaceFile fails in
IndexedDB.
BUG=229268
Review URL: https://chromiumcodereview.appspot.com/14886003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199025 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Broke both windows clobber and official builders' compile with this error:
771>Link:
771> Creating library ..\..\..\build\Release\lib\gcp_portmon64.lib and
object ..\..\..\build\Release\lib\gcp_portmon64.exp
771>base.lib(path_service.obj) : fatalerror LNK1112: module machine type 'X86'
conflicts with target machine type 'x64'
771>
771>Build FAILED.
> Move FileEnumerator to its own file, do some refactoring.
>
> It creates a class FileInfo to contain the details rather than using a platform-specific typedef. This allows the accessors GetName, GetSize, etc. to be moved directly to this class (previously they were static helpers on the FileEnumerator class) which makes a bunch of code much cleaner. It also gives reasonable getting and initialization which the previous version lacked.
>
> BUG=175002
> R=rvargas@chromium.org
>
> Review URL: https://codereview.chromium.org/13165005
TBR=brettw@chromium.org
Review URL: https://codereview.chromium.org/14824006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198850 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
It creates a class FileInfo to contain the details rather than using a platform-specific typedef. This allows the accessors GetName, GetSize, etc. to be moved directly to this class (previously they were static helpers on the FileEnumerator class) which makes a bunch of code much cleaner. It also gives reasonable getting and initialization which the previous version lacked.
BUG=175002
R=rvargas@chromium.org
Review URL: https://codereview.chromium.org/13165005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198820 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
These were only used in three files and is just a wrapper around a simple string compare.
Additionally, the BaseName() behavior of this function is likely unexpected for most callers (i.e. IsDot("/foo/bar/.") == true). It's clearer to inline exactly what the caller wants instead.
Review URL: https://chromiumcodereview.appspot.com/13350014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194075 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EnsureEndsWithSeparator used to check whether the file existed. This seems bad and unnecessary so I removed it.
I removed file_util::ContainsPath and used the existing file_util::IsParent instead. The functions descriptions are the same but the implementations do slightly different things, which is worrying. The only non-test use of this function to worry about is content/browser/storage_partition_impl_map.cc. As far as I see, the requirements for this seem OK, but I'm not very familiar with this.
After some discussion with akalin, I changed sync/internal_api/sync_manager_impl.cc to be a DCHECK that the path is absolute rather than make it absolute. The old code relied on the behavior of the old function that the argument would be unchanged if the file didn't exist, and this (possibly relative) path would be used later. This behavior doesn't make a lot of sense, and it looks like now that the path is always absolute, so I replaced this call with a DCHECK.
BUG=
Review URL: https://codereview.chromium.org/13196006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193855 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The commented behaviour is tested in a unit test and commented on in the
POSIX implementation. However, it was a surprise to me! Add a comment for
future generations benefit.
R=sky@chromium.org
BUG=None
Review URL: https://chromiumcodereview.appspot.com/14169004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193790 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
already existed.
BUG=180744
Review URL: https://chromiumcodereview.appspot.com/13375019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192253 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove HasBeenModifiedSince which isn't used.
Remove ComputeFilesSize which is only used in one place. Move the
implementation to that one file.
Remove CountFilesCreatedAfter. Windows and Posix each had large complicated
implementations and it's only used legitimately once (ui_test.cc) and in a
relatively simple context (certainly not complicated enough to justify the
paragraph the posix implementation has about file time rounding). I inlined
a simple implementation using the FileEnumerator which is little code and is
cross-platform.
CountFilesCreatedAfter was additionally (ab)used by Linux sandbox code in two
places to determine if 1 or more files matched a given name. I inlined a
FileEnumerator check in each of these places that's more appropriate to the
use.
Review URL: https://codereview.chromium.org/13323004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191993 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=175002
TEST=base_unittests
R=brettw@chromium.org
TBR=erikwright@chromium.org,tommi@chromium.org,fischman@chromium.org,ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12321062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184356 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
TBR=sky
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=162734
TEST=Manually tested (Rename a file on Google Drive to >300 characters, and download).
Review URL: https://chromiumcodereview.appspot.com/12212010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183727 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
These functions are used a lot in IPC receivers to manage storage.
See http://src.chromium.org/viewvc/chrome?view=rev&revision=175642
Review URL: https://codereview.chromium.org/12223014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181045 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes.
Review URL: https://codereview.chromium.org/12163003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://codereview.chromium.org/11896097
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178660 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This forces explicit normalization of paths and make path escaping security bugs much harder to exploit. See for example bug 167122
BUG=168890
TEST=included tests
Review URL: https://codereview.chromium.org/11782005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175642 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/11366229
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167739 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://crrev.com/155918) -- Refactoring and tests for the highly undertested file_util::CreateOrUpdateShortcutLink() method.
Simplify file_util::CreateOrUpdateShortcutLink()'s interface (use a struct to set parameters passed which allows callers to specify exactly what they want without having to pass in a bunch of NULLs for the unused parameters).
The same concept will be used for ShellUtil's shortcut functions in an upcoming CL.
Moved ShellUtil::VerifyChromeShortcut() to file_util::VerifyShortcut() and augmented it for every shortcut properties. This will also allow other shortcut creators (web apps, profiles, etc.) to have a broader test coverage on the shortcut they create (i.e. more testable properties available).
I will leave it up to the owners of these various projects to augment their tests, this CL keeps the previously tested behavior, not more, not less.
This is the 1st CL of a massive refactoring effort for shortcuts (http://goo.gl/Az889) in which ShellUtil's shortcut methods have to be refactored (http://codereview.chromium.org/10836247/ : soon to incorporate interface changes from this CL) which led me even lower to first refactor file_util's shortcut methods.
TBR=robertshield@chromium.org, sky@chromium.org, agl@chromium.org, dgrogan@chromium.org
BUG=132825, 148539
TEST=base_unittests --gtest_filter=FileUtilShortcutTest*
installer_util_unitests --gtest_filter=ShellUtilTestWithDirAndDist*
unit_tests --gtest_filter=ProfileShortcutManagerTest*
(run tests on XP as well)
Review URL: https://chromiumcodereview.appspot.com/10909171
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156250 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=133270
Review URL: https://chromiumcodereview.appspot.com/10916204
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156229 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert 155869 - Refactoring and tests for the highly undertested file_util::CreateOrUpdateShortcutLink() method.
Simplify file_util::CreateOrUpdateShortcutLink()'s interface (use a struct to set parameters passed which allows callers to specify exactly what they want without having to pass in a bunch of NULLs for the unused parameters).
The same concept will be used for ShellUtil's shortcut functions in an upcoming CL.
Moved ShellUtil::VerifyChromeShortcut() to file_util::VerifyShortcut() and augmented it for every shortcut properties. This will also allow other shortcut creators (web apps, profiles, etc.) to have a broader test coverage on the shortcut they create (i.e. more testable properties available).
I will leave it up to the owners of these various projects to augment their tests, this CL keeps the previously tested behavior, not more, not less.
This is the 1st CL of a massive refactoring effort for shortcuts (http://goo.gl/Az889) in which ShellUtil's shortcut methods have to be refactored (http://codereview.chromium.org/10836247/ : soon to incorporate interface changes from this CL) which led me even lower to first refactor file_util's shortcut methods.
BUG=132825
TEST=base_unittests --gtest_filter=FileUtilShortcutTest*
installer_util_unitests --gtest_filter=ShellUtilTestWithDirAndDist*
unit_tests --gtest_filter=ProfileShortcutManagerTest*
Review URL: https://chromiumcodereview.appspot.com/10914109
TBR=gab@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10910183
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155918 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file_util::CreateOrUpdateShortcutLink() method.
Simplify file_util::CreateOrUpdateShortcutLink()'s interface (use a struct to set parameters passed which allows callers to specify exactly what they want without having to pass in a bunch of NULLs for the unused parameters).
The same concept will be used for ShellUtil's shortcut functions in an upcoming CL.
Moved ShellUtil::VerifyChromeShortcut() to file_util::VerifyShortcut() and augmented it for every shortcut properties. This will also allow other shortcut creators (web apps, profiles, etc.) to have a broader test coverage on the shortcut they create (i.e. more testable properties available).
I will leave it up to the owners of these various projects to augment their tests, this CL keeps the previously tested behavior, not more, not less.
This is the 1st CL of a massive refactoring effort for shortcuts (http://goo.gl/Az889) in which ShellUtil's shortcut methods have to be refactored (http://codereview.chromium.org/10836247/ : soon to incorporate interface changes from this CL) which led me even lower to first refactor file_util's shortcut methods.
BUG=132825
TEST=base_unittests --gtest_filter=FileUtilShortcutTest*
installer_util_unitests --gtest_filter=ShellUtilTestWithDirAndDist*
unit_tests --gtest_filter=ProfileShortcutManagerTest*
Review URL: https://chromiumcodereview.appspot.com/10914109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155869 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=None
Review URL: https://chromiumcodereview.appspot.com/10832378
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152208 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
takes or-ed bitmasks,
to remove static_cast<> in the callers.
BUG=139130
TEST=try bots
Review URL: https://chromiumcodereview.appspot.com/10855002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151192 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=130456
TEST=Check app shortcuts are removed when the app is uninstalled. Test extension uninstallation in general.
Review URL: https://chromiumcodereview.appspot.com/10837034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151021 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The #endif comments were missed in the original CL.
TBR=
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10795086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148084 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
For context see this thread:
https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II
TBR=thakis,pkasting,jam
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=134821, 134820
TEST=both base_unittests:FileUtilTest.*, VerifyPathControlledByUserTest.* and unit_tests:Gdata* pass
Review URL: https://chromiumcodereview.appspot.com/10756020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146020 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
grp.h is not available on the last SDK version for iOS.
Moreover, iOS never care about file permission, so the method using
this header is never used. This patch remove VerifyPathControlledByAdmin
for iOS.
BUG=None
TEST=None
R=mark@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10700131
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145669 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary as the follow-up patches will need a clean way to call CreateOrUpdateChromeShortcuts() while knowing the outcome which was kind of vague before (and would have required passing in a fake InstallStatus to simulate the desired behaviour...).
BUG=132825, 127544, 131415
TEST=Install Chrome at user and system-level with and without create_all_shortcuts and verify that shortcut creation is as expected.
Over-install this custom installer over chrome-dev after having deleted its shortcuts and verify they are not recreated.
Review URL: https://chromiumcodereview.appspot.com/10692034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145609 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch, file_util::Delete() uses lstat64() instead of stat64(), so that Delete() checks the existence of the symbolic link itself not a file pointed by the symlink. This allows us to delete a symbolic link when it points to a non-existent file.
BUG=119430
TEST=base_unittests::FileUtilTest.* passes.
Review URL: https://chromiumcodereview.appspot.com/10690047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145060 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DevTools wants to save very big files like HeapSnapshots.
It is not possible at the moment because the file can be about ~6Gb.
BUG=none
TEST=FileUtilTest.AppendToFile
Review URL: http://codereview.chromium.org/10263003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134492 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=119242
TEST=Test DualModeApp properties are correctly set in Windows 8 on Start Menu shortcut.
Review URL: http://codereview.chromium.org/9837120
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131163 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=24672
TEST=none
Review URL: http://codereview.chromium.org/9691059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126749 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=114732
TEST="existing tests"
Review URL: http://codereview.chromium.org/9638002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125949 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9480020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123922 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This functionality has been moved to chrome/app.
See http://codereview.chromium.org/9235053/
Note that CL 9235053 must be landed BEFORE this one.
BUG=chromium:98508
TEST=
Review URL: http://codereview.chromium.org/9309083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120761 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=108724
TBR=yoz@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9309089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120502 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
I reduced the 4 methods into 3 by only having one GetUniquePathNumber which takes an optional suffix.
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/9316004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119984 0039d316-1c4b-4281-b951-d872f2087c98
|