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

Side by Side Diff: chromeos/dbus/debug_daemon_client.cc

Issue 2613683004: Completely rewrite the PpdProvider/PpdCache to use the SCS backend. Along the way, clean it up a l… (Closed)
Patch Set: Fixup one more unit test Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/dbus/debug_daemon_client.h" 5 #include "chromeos/dbus/debug_daemon_client.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 const std::string& name, 491 const std::string& name,
492 const std::string& uri, 492 const std::string& uri,
493 const std::string& ppd_contents, 493 const std::string& ppd_contents,
494 const DebugDaemonClient::CupsAddPrinterCallback& callback, 494 const DebugDaemonClient::CupsAddPrinterCallback& callback,
495 const base::Closure& error_callback) override { 495 const base::Closure& error_callback) override {
496 dbus::MethodCall method_call(debugd::kDebugdInterface, 496 dbus::MethodCall method_call(debugd::kDebugdInterface,
497 debugd::kCupsAddManuallyConfiguredPrinter); 497 debugd::kCupsAddManuallyConfiguredPrinter);
498 dbus::MessageWriter writer(&method_call); 498 dbus::MessageWriter writer(&method_call);
499 writer.AppendString(name); 499 writer.AppendString(name);
500 writer.AppendString(uri); 500 writer.AppendString(uri);
501 writer.AppendString(ppd_contents); 501 writer.AppendArrayOfBytes(
502 reinterpret_cast<const uint8_t*>(ppd_contents.data()),
503 ppd_contents.size());
502 504
503 debugdaemon_proxy_->CallMethod( 505 debugdaemon_proxy_->CallMethod(
504 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, 506 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
505 base::Bind(&DebugDaemonClientImpl::OnPrinterAdded, 507 base::Bind(&DebugDaemonClientImpl::OnPrinterAdded,
506 weak_ptr_factory_.GetWeakPtr(), callback, error_callback)); 508 weak_ptr_factory_.GetWeakPtr(), callback, error_callback));
507 } 509 }
508 510
509 void CupsAddAutoConfiguredPrinter( 511 void CupsAddAutoConfiguredPrinter(
510 const std::string& name, 512 const std::string& name,
511 const std::string& uri, 513 const std::string& uri,
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 DebugDaemonClient::EmptyStopAgentTracingCallback() { 808 DebugDaemonClient::EmptyStopAgentTracingCallback() {
807 return base::Bind(&EmptyStopAgentTracingCallbackBody); 809 return base::Bind(&EmptyStopAgentTracingCallbackBody);
808 } 810 }
809 811
810 // static 812 // static
811 DebugDaemonClient* DebugDaemonClient::Create() { 813 DebugDaemonClient* DebugDaemonClient::Create() {
812 return new DebugDaemonClientImpl(); 814 return new DebugDaemonClientImpl();
813 } 815 }
814 816
815 } // namespace chromeos 817 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698