OLD | NEW |
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 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_PARSER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_PARSER_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_PARSER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_PARSER_H_ |
7 | 7 |
8 // Parsers and formatters for SafeBrowsing v3.0 protocol: | 8 // Parsers and formatters for SafeBrowsing v3.0 protocol: |
9 // https://developers.google.com/safe-browsing/developers_guide_v3 | 9 // https://developers.google.com/safe-browsing/developers_guide_v3 |
10 // | 10 // |
11 // The quoted references are with respect to that document. | 11 // The quoted references are with respect to that document. |
12 | 12 |
| 13 #include <stddef.h> |
| 14 |
13 #include <string> | 15 #include <string> |
14 #include <vector> | 16 #include <vector> |
15 | 17 |
16 #include "base/basictypes.h" | |
17 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 18 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class TimeDelta; | 21 class TimeDelta; |
21 }; | 22 }; |
22 | 23 |
23 namespace safe_browsing { | 24 namespace safe_browsing { |
24 | 25 |
25 // TODO(shess): Maybe the data/len pairs could be productively replaced with | 26 // TODO(shess): Maybe the data/len pairs could be productively replaced with |
26 // const base::StringPiece&. | 27 // const base::StringPiece&. |
(...skipping 28 matching lines...) Expand all Loading... |
55 | 56 |
56 // Convert prefix hashes into a "HTTP Request for Full-Length Hashes" body. | 57 // Convert prefix hashes into a "HTTP Request for Full-Length Hashes" body. |
57 std::string FormatGetHash(const std::vector<SBPrefix>& prefixes); | 58 std::string FormatGetHash(const std::vector<SBPrefix>& prefixes); |
58 | 59 |
59 // Format the LIST part of "HTTP Request for Data" body. | 60 // Format the LIST part of "HTTP Request for Data" body. |
60 std::string FormatList(const SBListChunkRanges& list); | 61 std::string FormatList(const SBListChunkRanges& list); |
61 | 62 |
62 } // namespace safe_browsing | 63 } // namespace safe_browsing |
63 | 64 |
64 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_PARSER_H_ | 65 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_PARSER_H_ |
OLD | NEW |