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

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

Issue 775343004: Move //mojo/shell to //shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « mojo/shell/context.cc ('k') | mojo/shell/data_pipe_peek.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include <string>
6
7 #include "mojo/public/cpp/system/core.h"
8
9 namespace mojo {
10 namespace shell {
11
12 // The Peek functions are only intended to be used by the
13 // DyanmicApplicationLoader class for discovering the type of a
14 // URL response. They are a stopgap to be replaced by real support
15 // in the DataPipe classes.
16
17 // Return true and the first newline terminated line from source. Return false
18 // if more than max_line_length bytes are scanned without seeing a newline, or
19 // if the timeout is exceeded.
20 bool BlockingPeekLine(
21 DataPipeConsumerHandle source,
22 std::string* line,
23 size_t max_line_length,
24 MojoDeadline timeout);
25
26 // Return true and the first bytes_length bytes from source. Return false
27 // if the timeout is exceeded.
28 bool BlockingPeekNBytes(
29 DataPipeConsumerHandle source,
30 std::string* bytes,
31 size_t bytes_length,
32 MojoDeadline timeout);
33
34 } // namespace shell
35 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/context.cc ('k') | mojo/shell/data_pipe_peek.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698