From 96b26238873a362e404b31f249552eab599662a5 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Wed, 9 Jan 2019 15:02:51 -0800 Subject: [PATCH] replace base::AssertBlockingAllowed with base::ScopedBlockingCall https://chromium-review.googlesource.com/c/1278540 --- atom/browser/common_web_contents_delegate.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index b25014bbcdf..0a95d50210c 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());