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

@ -387,8 +387,8 @@ WebContents::WebContents(v8::Isolate* isolate, const mate::Dictionary& options)
GURL("chrome-guest://fake-host"));
content::WebContents::CreateParams params(session->browser_context(),
site_instance);
guest_delegate_.reset(
new WebViewGuestDelegate(embedder_->web_contents(), this));
guest_delegate_ =
std::make_unique<WebViewGuestDelegate>(embedder_->web_contents(), this);
params.guest_delegate = guest_delegate_.get();
#if BUILDFLAG(ENABLE_OSR)
@ -828,7 +828,7 @@ std::unique_ptr<content::BluetoothChooser> WebContents::RunBluetoothChooser(
content::JavaScriptDialogManager* WebContents::GetJavaScriptDialogManager(
content::WebContents* source) {
if (!dialog_manager_)
dialog_manager_.reset(new AtomJavaScriptDialogManager(this));
dialog_manager_ = std::make_unique<AtomJavaScriptDialogManager>(this);
return dialog_manager_.get();
}
@ -2038,8 +2038,8 @@ void WebContents::BeginFrameSubscription(mate::Arguments* args) {
return;
}
frame_subscriber_.reset(
new FrameSubscriber(web_contents(), callback, only_dirty));
frame_subscriber_ =
std::make_unique<FrameSubscriber>(web_contents(), callback, only_dirty);
}
void WebContents::EndFrameSubscription() {