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

Side by Side Diff: mojo/shell/data_pipe_peek.cc

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month 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 | « media/video/video_encode_accelerator.cc ('k') | net/quic/crypto/strike_register.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 "mojo/shell/data_pipe_peek.h" 5 #include "mojo/shell/data_pipe_peek.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm>
10
9 #include "base/bind.h" 11 #include "base/bind.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 13
12 namespace mojo { 14 namespace mojo {
13 namespace shell { 15 namespace shell {
14 16
15 namespace { 17 namespace {
16 18
17 // Sleep for as long as max_sleep_micros if the deadline hasn't been reached 19 // Sleep for as long as max_sleep_micros if the deadline hasn't been reached
18 // and the number of bytes read is still increasing. Returns true if sleep 20 // and the number of bytes read is still increasing. Returns true if sleep
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 bool BlockingPeekLine(DataPipeConsumerHandle source, 153 bool BlockingPeekLine(DataPipeConsumerHandle source,
152 std::string* line, 154 std::string* line,
153 size_t max_line_length, 155 size_t max_line_length,
154 MojoDeadline timeout) { 156 MojoDeadline timeout) {
155 PeekFunc peek_line = base::Bind(PeekLine, max_line_length); 157 PeekFunc peek_line = base::Bind(PeekLine, max_line_length);
156 return BlockingPeekHelper(source, line, timeout, peek_line); 158 return BlockingPeekHelper(source, line, timeout, peek_line);
157 } 159 }
158 160
159 } // namespace shell 161 } // namespace shell
160 } // namespace mojo 162 } // namespace mojo
OLDNEW
« no previous file with comments | « media/video/video_encode_accelerator.cc ('k') | net/quic/crypto/strike_register.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698