diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index b25014bbcdf4..0a95d50210c1 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -20,6 +20,7 @@ #include "base/files/file_util.h" #include "base/json/json_reader.h" #include "base/task/post_task.h" +#include "base/threading/scoped_blocking_call.h" #include "base/threading/sequenced_task_runner_handle.h" #include "chrome/browser/ssl/security_state_tab_helper.h" #include "chrome/browser/ui/browser_dialogs.h" @@ -121,14 +122,14 @@ std::unique_ptr CreateFileSystemValue( } void WriteToFile(const base::FilePath& path, const std::string& content) { - base::AssertBlockingAllowed(); + base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK); DCHECK(!path.empty()); base::WriteFile(path, content.data(), content.size()); } void AppendToFile(const base::FilePath& path, const std::string& content) { - base::AssertBlockingAllowed(); + base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK); DCHECK(!path.empty()); base::AppendToFile(path, content.data(), content.size());