Commit b339e4a1 authored by Tal Pressman's avatar Tal Pressman Committed by Chromium LUCI CQ

Remove GetFileModificationTime and RebindFileUtilitiesForTesting.

These functions are unused.

Change-Id: I5cb37b52bf5518490a96d533ffe417cbc920993b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2578222Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Tal Pressman <talp@google.com>
Cr-Commit-Position: refs/heads/master@{#834590}
parent 3b48e11b
...@@ -78,24 +78,6 @@ bool GetFileSize(const String& path, int64_t& result) { ...@@ -78,24 +78,6 @@ bool GetFileSize(const String& path, int64_t& result) {
return true; return true;
} }
bool GetFileModificationTime(const String& path,
base::Optional<base::Time>& result) {
FileMetadata metadata;
if (!GetFileMetadata(path, metadata))
return false;
result = metadata.modification_time;
return true;
}
void RebindFileUtilitiesForTesting() {
auto& host = GetFileUtilitiesHost();
if (host) {
host.Unbind().reset();
}
Platform::Current()->GetBrowserInterfaceBroker()->GetInterface(
host.BindNewPipeAndPassReceiver());
}
bool GetFileMetadata(const String& path, FileMetadata& metadata) { bool GetFileMetadata(const String& path, FileMetadata& metadata) {
auto& host = GetFileUtilitiesHost(); auto& host = GetFileUtilitiesHost();
if (!host) { if (!host) {
......
...@@ -64,14 +64,9 @@ class FileMetadata { ...@@ -64,14 +64,9 @@ class FileMetadata {
}; };
PLATFORM_EXPORT bool GetFileSize(const String&, int64_t& result); PLATFORM_EXPORT bool GetFileSize(const String&, int64_t& result);
PLATFORM_EXPORT bool GetFileModificationTime(
const String&,
base::Optional<base::Time>& result);
PLATFORM_EXPORT bool GetFileMetadata(const String&, FileMetadata&); PLATFORM_EXPORT bool GetFileMetadata(const String&, FileMetadata&);
PLATFORM_EXPORT KURL FilePathToURL(const String&); PLATFORM_EXPORT KURL FilePathToURL(const String&);
PLATFORM_EXPORT void RebindFileUtilitiesForTesting();
inline base::Optional<base::Time> NullableTimeToOptionalTime(base::Time time) { inline base::Optional<base::Time> NullableTimeToOptionalTime(base::Time time) {
if (time.is_null()) if (time.is_null())
return base::nullopt; return base::nullopt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment