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

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

Issue 1701933004: Remove the old package manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@am2
Patch Set: . Created 4 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
« no previous file with comments | « mojo/shell/content_handler_connection.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 #ifndef MOJO_SHELL_DATA_PIPE_PEEK_H_
6 #define MOJO_SHELL_DATA_PIPE_PEEK_H_
7
8 #include <stddef.h>
9
10 #include <string>
11
12 #include "mojo/public/cpp/system/core.h"
13
14 namespace mojo {
15 namespace shell {
16
17 // The Peek functions are only intended to be used by the
18 // DyanmicApplicationLoader class for discovering the type of a
19 // URL response. They are a stopgap to be replaced by real support
20 // in the DataPipe classes.
21
22 // Return true and the first newline terminated line from source. Return false
23 // if more than max_line_length bytes are scanned without seeing a newline, or
24 // if the timeout is exceeded.
25 bool BlockingPeekLine(DataPipeConsumerHandle source,
26 std::string* line,
27 size_t max_line_length,
28 MojoDeadline timeout);
29
30 // Return true and the first bytes_length bytes from source. Return false
31 // if the timeout is exceeded.
32 bool BlockingPeekNBytes(DataPipeConsumerHandle source,
33 std::string* bytes,
34 size_t bytes_length,
35 MojoDeadline timeout);
36
37 } // namespace shell
38 } // namespace mojo
39
40 #endif // MOJO_SHELL_DATA_PIPE_PEEK_H_
OLDNEW
« no previous file with comments | « mojo/shell/content_handler_connection.cc ('k') | mojo/shell/data_pipe_peek.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698