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

Unified Diff: printing/backend/print_backend_chromeos.cc

Issue 2105463002: Create a new print backend for the updated CUPS APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typos. Created 4 years, 5 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 | « printing/backend/cups_printer.cc ('k') | printing/backend/print_backend_cups_ipp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/backend/print_backend_chromeos.cc
diff --git a/printing/backend/print_backend_chromeos.cc b/printing/backend/print_backend_chromeos.cc
index 35f51b7ec6085e53069e76f3ad61971fe4009a1a..e27bc4e658ace8e35d18e6f59366bdd5875075e9 100644
--- a/printing/backend/print_backend_chromeos.cc
+++ b/printing/backend/print_backend_chromeos.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,12 +10,14 @@
#include "url/gurl.h"
#if defined(USE_CUPS)
-#include "printing/backend/print_backend_cups.h"
+#include "base/memory/ptr_util.h"
+#include "printing/backend/print_backend_cups_ipp.h"
#endif // defined(USE_CUPS)
namespace printing {
-// Provides a stubbed out PrintBackend implementation for use on ChromeOS.
+// Provides either a stubbed out PrintBackend implementation or a CUPS IPP
+// implementation for use on ChromeOS.
class PrintBackendChromeOS : public PrintBackend {
public:
PrintBackendChromeOS();
@@ -93,9 +95,13 @@ scoped_refptr<PrintBackend> PrintBackend::CreateInstance(
print_backend_settings->GetInteger(kCUPSEncryption, &encryption);
}
GURL print_server_url(print_server_url_str.c_str());
- return new PrintBackendCUPS(print_server_url,
- static_cast<http_encryption_t>(encryption),
- cups_blocking == kValueTrue);
+
+ std::unique_ptr<CupsConnection> connection =
+ base::MakeUnique<CupsConnection>(
+ print_server_url, static_cast<http_encryption_t>(encryption),
+ cups_blocking == kValueTrue);
+
+ return new PrintBackendCupsIpp(std::move(connection));
#endif // defined(USE_CUPS)
}
« no previous file with comments | « printing/backend/cups_printer.cc ('k') | printing/backend/print_backend_cups_ipp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698