replace base::AssertBlockingAllowed with base::ScopedBlockingCall

https://chromium-review.googlesource.com/c/1278540
This commit is contained in:
Jeremy Apthorp 2019-01-09 15:02:51 -08:00
parent e0d277e667
commit 96b2623887

View file

@ -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<base::DictionaryValue> 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());