Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: extensions/browser/api/printer_provider_internal/printer_provider_internal_api.cc

Issue 2351823004: [Extensions] Consolidate ExtensionFunction::SendResponse()s (Closed)
Patch Set: lazyboy's Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/chrome_extension_function.cc ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/printer_provider_internal/printer_provider_internal_api.cc
diff --git a/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.cc b/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.cc
index e9f3e0b5ab74f8b1339705c5f0b80273197a8534..db57e7f27bfed88a05e0b325beef39e663c74365 100644
--- a/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.cc
+++ b/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.cc
@@ -223,8 +223,7 @@ void PrinterProviderInternalGetPrintDataFunction::OnBlob(
const scoped_refptr<base::RefCountedMemory>& data,
std::unique_ptr<content::BlobHandle> blob) {
if (!blob) {
- SetError("Unable to create the blob.");
- SendResponse(false);
+ Respond(Error("Unable to create the blob."));
return;
}
@@ -241,9 +240,8 @@ void PrinterProviderInternalGetPrintDataFunction::OnBlob(
render_frame_host()->GetProcess());
holder->HoldBlobReference(std::move(blob));
- results_ = internal_api::GetPrintData::Results::Create(info);
SetTransferredBlobUUIDs(uuids);
- SendResponse(true);
+ Respond(ArgumentList(internal_api::GetPrintData::Results::Create(info)));
}
PrinterProviderInternalReportUsbPrinterInfoFunction::
« no previous file with comments | « chrome/browser/extensions/chrome_extension_function.cc ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698