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

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

Issue 2854953005: Use constexpr TaskTraits constructor in chromeos. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « chromeos/dbus/fake_permission_broker_client.cc ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/lorgnette_manager_client.h" 5 #include "chromeos/dbus/lorgnette_manager_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 virtual ~ScanToStringCompletion() {} 99 virtual ~ScanToStringCompletion() {}
100 100
101 // Creates a file stream in |file| that will stream image data to 101 // Creates a file stream in |file| that will stream image data to
102 // a string that will be supplied to |callback|. Passes ownership 102 // a string that will be supplied to |callback|. Passes ownership
103 // of |this| to a returned callback. 103 // of |this| to a returned callback.
104 CompletionCallback Start(const ScanImageToStringCallback& callback, 104 CompletionCallback Start(const ScanImageToStringCallback& callback,
105 base::ScopedFD* fd) { 105 base::ScopedFD* fd) {
106 CHECK(!pipe_reader_.get()); 106 CHECK(!pipe_reader_.get());
107 pipe_reader_.reset(new chromeos::PipeReaderForString( 107 pipe_reader_.reset(new chromeos::PipeReaderForString(
108 base::CreateTaskRunnerWithTraits( 108 base::CreateTaskRunnerWithTraits(
109 base::TaskTraits().MayBlock().WithShutdownBehavior( 109 {base::MayBlock(),
110 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)), 110 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}),
111 base::Bind(&ScanToStringCompletion::OnScanToStringDataCompleted, 111 base::Bind(&ScanToStringCompletion::OnScanToStringDataCompleted,
112 base::Unretained(this)))); 112 base::Unretained(this))));
113 *fd = pipe_reader_->StartIO(); 113 *fd = pipe_reader_->StartIO();
114 114
115 return base::Bind(&ScanToStringCompletion::OnScanToStringCompleted, 115 return base::Bind(&ScanToStringCompletion::OnScanToStringCompleted,
116 base::Owned(this), callback); 116 base::Owned(this), callback);
117 } 117 }
118 118
119 private: 119 private:
120 // Called when a |pipe_reader_| completes reading scan data to a string. 120 // Called when a |pipe_reader_| completes reading scan data to a string.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 LorgnetteManagerClient::~LorgnetteManagerClient() { 213 LorgnetteManagerClient::~LorgnetteManagerClient() {
214 } 214 }
215 215
216 // static 216 // static
217 LorgnetteManagerClient* LorgnetteManagerClient::Create() { 217 LorgnetteManagerClient* LorgnetteManagerClient::Create() {
218 return new LorgnetteManagerClientImpl(); 218 return new LorgnetteManagerClientImpl();
219 } 219 }
220 220
221 } // namespace chromeos 221 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_permission_broker_client.cc ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698