refactor: run clang-tidy (#20231)

* refactor: clang-tidy modernize-use-nullptr

* refactor: clang-tidy modernize-use-equals-default

* refactor: clang-tidy modernize-make-unique

* refactor: omit nullptr arg from unique_ptr.reset()

As per comment by @miniak
This commit is contained in:
Charles Kerr 2019-09-16 18:12:00 -04:00 committed by GitHub
parent 660e566201
commit 2b316f3843
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 261 additions and 223 deletions

View file

@ -68,7 +68,7 @@ namespace {
const char kRootName[] = "<root>";
struct FileSystem {
FileSystem() {}
FileSystem() = default;
FileSystem(const std::string& type,
const std::string& file_system_name,
const std::string& root_url,
@ -182,7 +182,7 @@ CommonWebContentsDelegate::CommonWebContentsDelegate()
base::CreateSequencedTaskRunnerWithTraits({base::MayBlock()})),
weak_factory_(this) {}
CommonWebContentsDelegate::~CommonWebContentsDelegate() {}
CommonWebContentsDelegate::~CommonWebContentsDelegate() = default;
void CommonWebContentsDelegate::InitWithWebContents(
content::WebContents* web_contents,
@ -309,7 +309,8 @@ void CommonWebContentsDelegate::RunFileChooser(
std::unique_ptr<content::FileSelectListener> listener,
const blink::mojom::FileChooserParams& params) {
if (!web_dialog_helper_)
web_dialog_helper_.reset(new WebDialogHelper(owner_window(), offscreen_));
web_dialog_helper_ =
std::make_unique<WebDialogHelper>(owner_window(), offscreen_);
web_dialog_helper_->RunFileChooser(render_frame_host, std::move(listener),
params);
}
@ -319,7 +320,8 @@ void CommonWebContentsDelegate::EnumerateDirectory(
std::unique_ptr<content::FileSelectListener> listener,
const base::FilePath& path) {
if (!web_dialog_helper_)
web_dialog_helper_.reset(new WebDialogHelper(owner_window(), offscreen_));
web_dialog_helper_ =
std::make_unique<WebDialogHelper>(owner_window(), offscreen_);
web_dialog_helper_->EnumerateDirectory(guest, std::move(listener), path);
}