replace base::AssertBlockingAllowed with base::ScopedBlockingCall
https://chromium-review.googlesource.com/c/1278540
This commit is contained in:
parent
e0d277e667
commit
96b2623887
1 changed files with 3 additions and 2 deletions
|
@ -20,6 +20,7 @@
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/json/json_reader.h"
|
#include "base/json/json_reader.h"
|
||||||
#include "base/task/post_task.h"
|
#include "base/task/post_task.h"
|
||||||
|
#include "base/threading/scoped_blocking_call.h"
|
||||||
#include "base/threading/sequenced_task_runner_handle.h"
|
#include "base/threading/sequenced_task_runner_handle.h"
|
||||||
#include "chrome/browser/ssl/security_state_tab_helper.h"
|
#include "chrome/browser/ssl/security_state_tab_helper.h"
|
||||||
#include "chrome/browser/ui/browser_dialogs.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) {
|
void WriteToFile(const base::FilePath& path, const std::string& content) {
|
||||||
base::AssertBlockingAllowed();
|
base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK);
|
||||||
DCHECK(!path.empty());
|
DCHECK(!path.empty());
|
||||||
|
|
||||||
base::WriteFile(path, content.data(), content.size());
|
base::WriteFile(path, content.data(), content.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppendToFile(const base::FilePath& path, const std::string& content) {
|
void AppendToFile(const base::FilePath& path, const std::string& content) {
|
||||||
base::AssertBlockingAllowed();
|
base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK);
|
||||||
DCHECK(!path.empty());
|
DCHECK(!path.empty());
|
||||||
|
|
||||||
base::AppendToFile(path, content.data(), content.size());
|
base::AppendToFile(path, content.data(), content.size());
|
||||||
|
|
Loading…
Reference in a new issue