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

@ -4,6 +4,8 @@
#include "shell/browser/web_dialog_helper.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
@ -77,7 +79,7 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
private:
friend class base::RefCounted<FileSelectHelper>;
~FileSelectHelper() override {}
~FileSelectHelper() override = default;
// net::DirectoryLister::DirectoryListerDelegate
void OnListFile(
@ -106,8 +108,8 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
DCHECK(!lister_base_dir_.empty());
DCHECK(lister_paths_.empty());
lister_.reset(new net::DirectoryLister(
lister_base_dir_, net::DirectoryLister::NO_SORT_RECURSIVE, this));
lister_ = std::make_unique<net::DirectoryLister>(
lister_base_dir_, net::DirectoryLister::NO_SORT_RECURSIVE, this);
lister_->Start();
// It is difficult for callers to know how long to keep a reference to
// this instance. We AddRef() here to keep the instance alive after we
@ -294,7 +296,7 @@ namespace electron {
WebDialogHelper::WebDialogHelper(NativeWindow* window, bool offscreen)
: window_(window), offscreen_(offscreen), weak_factory_(this) {}
WebDialogHelper::~WebDialogHelper() {}
WebDialogHelper::~WebDialogHelper() = default;
void WebDialogHelper::RunFileChooser(
content::RenderFrameHost* render_frame_host,