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