Commit 4739e4f3 authored by dcheng's avatar dcheng Committed by Commit bot

Printing fixups for scoped_refptr operator T* removal.

BUG=110610

Review URL: https://codereview.chromium.org/509423002

Cr-Commit-Position: refs/heads/master@{#293104}
parent 672e23e9
......@@ -15,8 +15,8 @@ class ServiceDiscoverySharedClient
public:
static scoped_refptr<ServiceDiscoverySharedClient> GetInstance();
typedef base::Callback<void(scoped_refptr<ServiceDiscoverySharedClient>)>
GetInstanceCallback;
typedef base::Callback<void(
const scoped_refptr<ServiceDiscoverySharedClient>&)> GetInstanceCallback;
static void GetInstanceWithoutAlert(const GetInstanceCallback& callback);
protected:
......
......@@ -427,7 +427,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
PrintHostMsg_UpdatePrintSettings::WriteReplyParams(
reply_msg,
params,
printer_query &&
printer_query.get() &&
(printer_query->last_status() == printing::PrintingContext::CANCEL));
Send(reply_msg);
// If user hasn't cancelled.
......
......@@ -1369,13 +1369,14 @@ bool PrintPreviewHandler::GetPreviewDataAndTitle(
#if defined(ENABLE_SERVICE_DISCOVERY)
void PrintPreviewHandler::StartPrivetLister(
scoped_refptr<local_discovery::ServiceDiscoverySharedClient> client) {
void PrintPreviewHandler::StartPrivetLister(const scoped_refptr<
local_discovery::ServiceDiscoverySharedClient>& client) {
if (!PrivetPrintingEnabled())
return web_ui()->CallJavascriptFunction("onPrivetPrinterSearchDone");
Profile* profile = Profile::FromWebUI(web_ui());
DCHECK(!service_discovery_client_ || service_discovery_client_ == client);
DCHECK(!service_discovery_client_.get() ||
service_discovery_client_ == client);
service_discovery_client_ = client;
printer_lister_.reset(new local_discovery::PrivetLocalPrinterLister(
service_discovery_client_.get(), profile->GetRequestContext(), this));
......
......@@ -260,8 +260,8 @@ class PrintPreviewHandler
#endif
#if defined(ENABLE_SERVICE_DISCOVERY)
void StartPrivetLister(
scoped_refptr<local_discovery::ServiceDiscoverySharedClient> client);
void StartPrivetLister(const scoped_refptr<
local_discovery::ServiceDiscoverySharedClient>& client);
void OnPrivetCapabilities(const base::DictionaryValue* capabilities);
void PrivetCapabilitiesUpdateClient(
scoped_ptr<local_discovery::PrivetHTTPClient> http_client);
......
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