Commit 78b94b3d authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Initialize PrintViewManagerBase members in the header when possible.

Also mark |queue_| as a const pointer.

Change-Id: I582f4a1c26eadba4dd7757efb2ee4a516fe9f063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382402Reviewed-by: default avatarDaniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802833}
parent f0095ab0
......@@ -112,8 +112,6 @@ void CreateQueryWithSettings(base::Value job_settings,
PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
: PrintManager(web_contents),
printing_rfh_(nullptr),
printing_succeeded_(false),
queue_(g_browser_process->print_job_manager()->queue()) {
DCHECK(queue_);
Profile* profile =
......
......@@ -206,10 +206,10 @@ class PrintViewManagerBase : public content::NotificationObserver,
content::NotificationRegistrar registrar_;
// The current RFH that is printing with a system printing dialog.
content::RenderFrameHost* printing_rfh_;
content::RenderFrameHost* printing_rfh_ = nullptr;
// Indication of success of the print job.
bool printing_succeeded_;
bool printing_succeeded_ = false;
// Set while running an inner message loop inside RenderAllMissingPagesNow().
// This means we are _blocking_ until all the necessary pages have been
......@@ -219,7 +219,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
// Whether printing is enabled.
BooleanPrefMember printing_enabled_;
scoped_refptr<PrintQueriesQueue> queue_;
const scoped_refptr<PrintQueriesQueue> queue_;
base::WeakPtrFactory<PrintViewManagerBase> weak_ptr_factory_{this};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment