Commit 99300b9a authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Rename helper function WriteFile to give it a unique name

In //extensions/browser a second helper function named
WriteFile just appeared and in jumbo builds where all of
extensions/browser is compiled in one translation unit (an extreme
jumbo configuration), the two clash. This patch renames the function
that is the least like base::WriteFile to "CreateDirAndWriteFile".

Change-Id: I0d3dc1bb3e13279a2bf333bc0c12985f2133a35d
Reviewed-on: https://chromium-review.googlesource.com/980056
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546050}
parent 09965805
......@@ -28,7 +28,8 @@ namespace {
using SortedFilePathSet = std::set<base::FilePath>;
bool WriteFile(const base::FilePath& destination, const std::string& content) {
bool CreateDirAndWriteFile(const base::FilePath& destination,
const std::string& content) {
base::AssertBlockingAllowed();
DCHECK(GetExtensionFileTaskRunner()->RunsTasksInCurrentSequence());
base::FilePath dir = destination.DirName();
......@@ -196,7 +197,7 @@ void ContentHash::DidFetchVerifiedContents(
base::FilePath destination =
file_util::GetVerifiedContentsPath(key.extension_root);
if (!WriteFile(destination, *fetched_contents)) {
if (!CreateDirAndWriteFile(destination, *fetched_contents)) {
LOG(ERROR) << "Error writing computed_hashes.json at " << destination;
ContentHash::DispatchFetchFailure(key, std::move(created_callback),
is_cancelled);
......
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