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

Side by Side Diff: tools/android/forwarder2/command.cc

Issue 15851009: Use a direct include of strings headers in testing/, third_party/, tools/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tools/android/common/net.cc ('k') | tools/android/forwarder2/daemon.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "tools/android/forwarder2/command.h" 5 #include "tools/android/forwarder2/command.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/safe_strerror_posix.h" 13 #include "base/safe_strerror_posix.h"
14 #include "base/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/string_piece.h" 15 #include "base/strings/string_piece.h"
16 #include "tools/android/forwarder2/socket.h" 16 #include "tools/android/forwarder2/socket.h"
17 17
18 using base::StringPiece; 18 using base::StringPiece;
19 19
20 namespace { 20 namespace {
21 21
22 22
23 // Command format: 23 // Command format:
24 // <port>:<type> 24 // <port>:<type>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 bool ReceivedCommand(command::Type command, Socket* socket) { 88 bool ReceivedCommand(command::Type command, Socket* socket) {
89 int port; 89 int port;
90 command::Type received_command; 90 command::Type received_command;
91 if (!ReadCommand(socket, &port, &received_command)) 91 if (!ReadCommand(socket, &port, &received_command))
92 return false; 92 return false;
93 return received_command == command; 93 return received_command == command;
94 } 94 }
95 95
96 } // namespace forwarder 96 } // namespace forwarder
OLDNEW
« no previous file with comments | « tools/android/common/net.cc ('k') | tools/android/forwarder2/daemon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698