Commit a3e71ebf authored by Vladislav Kuzkokov's avatar Vladislav Kuzkokov Committed by Commit Bot

[Printing] Passing |scoped_refptr<...>| by value.

Updating code w.r.t. coding conventions:
https://chromium.googlesource.com/chromium/src/+/lkgr/styleguide/c++/c++.md#object-ownership-and-calling-conventions

Bug: 968109
Change-Id: Ib6aef90f69bfc10e7fe792502456427fce82a0e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639217Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Vladislav Kuzkokov <vkuzkokov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665525}
parent ec0d633a
......@@ -148,7 +148,7 @@ class MockServiceIPCServer : public ServiceIPCServer {
MockServiceIPCServer(
ServiceIPCServer::Client* client,
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
base::WaitableEvent* shutdown_event)
: ServiceIPCServer(client, io_task_runner, shutdown_event) {}
......
......@@ -132,8 +132,7 @@ void PrivetPrinterHandler::OnPrivetPrintingError(
}
void PrivetPrinterHandler::StartLister(
const scoped_refptr<local_discovery::ServiceDiscoverySharedClient>&
client) {
scoped_refptr<local_discovery::ServiceDiscoverySharedClient> client) {
DCHECK(!service_discovery_client_.get() ||
service_discovery_client_.get() == client.get());
service_discovery_client_ = client;
......
......@@ -66,8 +66,7 @@ class PrivetPrinterHandler
private:
void StartLister(
const scoped_refptr<local_discovery::ServiceDiscoverySharedClient>&
client);
scoped_refptr<local_discovery::ServiceDiscoverySharedClient> client);
void StopLister();
void CapabilitiesUpdateClient(
std::unique_ptr<cloud_print::PrivetHTTPClient> http_client);
......
......@@ -438,7 +438,7 @@ class JobSpoolerWin : public PrintSystem::JobSpooler {
const gfx::Rect& render_area,
const gfx::Size& render_dpi,
bool use_color,
const scoped_refptr<base::SingleThreadTaskRunner>& client_task_runner) {
scoped_refptr<base::SingleThreadTaskRunner> client_task_runner) {
DCHECK(CurrentlyOnServiceIOThread());
auto utility_host = std::make_unique<ServiceUtilityProcessHost>(
this, client_task_runner.get());
......
......@@ -41,7 +41,7 @@ PrintMockRenderThread::GetIOTaskRunner() {
}
void PrintMockRenderThread::set_io_task_runner(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
io_task_runner_ = task_runner;
}
......
......@@ -43,7 +43,7 @@ class PrintMockRenderThread : public content::MockRenderThread {
// The following functions are called by the test itself.
void set_io_task_runner(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
#if BUILDFLAG(ENABLE_PRINTING)
// Returns the pseudo-printer instance.
......
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