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

Side by Side Diff: rlz/lib/net_response_check.h

Issue 2857343004: Add rlz_utils as a new build target to rlz/ (Closed)
Patch Set: build.gn fix 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 | « rlz/BUILD.gn ('k') | rlz/lib/net_response_check.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 2017 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
6 #ifndef RLZ_LIB_NET_RESPONSE_CHECK_H_
7 #define RLZ_LIB_NET_RESPONSE_CHECK_H_
8
9 #include <string>
10 #include "rlz/lib/rlz_api.h"
11
12 // Checksum validation convenience call for RLZ network responses.
13 namespace rlz_lib {
14 // The maximum length of a ping response we will parse in bytes. If the response
15 // is bigger, please break it up into separate calls.
16 const size_t kMaxPingResponseLength = 0x4000; // 16K
17
18 // Checks if a ping response is valid - ie. it has a checksum line which
19 // is the CRC-32 checksum of the message up to the checksum. If
20 // checksum_idx is not NULL, it will get the index of the checksum, i.e. -
21 // the effective end of the message.
22 // Access: No restrictions.
23 bool RLZ_LIB_API IsPingResponseValid(const char* response, int* checksum_idx);
24
25 }; // namespace rlz_lib
26
27 #endif // RLZ_LIB_NET_RESPONSE_CHECK_H_
OLDNEW
« no previous file with comments | « rlz/BUILD.gn ('k') | rlz/lib/net_response_check.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698