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

Side by Side Diff: net/der/parser.h

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 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 | « net/der/parse_values.h ('k') | net/disk_cache/backend_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 NET_DER_PARSER_H_ 5 #ifndef NET_DER_PARSER_H_
6 #define NET_DER_PARSER_H_ 6 #define NET_DER_PARSER_H_
7 7
8 #include <stdint.h>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h"
9 #include "base/time/time.h" 12 #include "base/time/time.h"
10 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
11 #include "net/der/input.h" 14 #include "net/der/input.h"
12 #include "net/der/tag.h" 15 #include "net/der/tag.h"
13 16
14 namespace net { 17 namespace net {
15 18
16 namespace der { 19 namespace der {
17 20
18 class BitString; 21 class BitString;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // and is a constructed tag, and creates a new Parser from the value. 142 // and is a constructed tag, and creates a new Parser from the value.
140 bool ReadConstructed(Tag tag, Parser* out) WARN_UNUSED_RESULT; 143 bool ReadConstructed(Tag tag, Parser* out) WARN_UNUSED_RESULT;
141 144
142 // A more specific form of ReadConstructed that expects the current tag 145 // A more specific form of ReadConstructed that expects the current tag
143 // to be 0x30 (SEQUENCE). 146 // to be 0x30 (SEQUENCE).
144 bool ReadSequence(Parser* out) WARN_UNUSED_RESULT; 147 bool ReadSequence(Parser* out) WARN_UNUSED_RESULT;
145 148
146 // Expects the current tag to be kInteger, and calls ParseUint64 on the 149 // Expects the current tag to be kInteger, and calls ParseUint64 on the
147 // current value. Note that DER-encoded integers are arbitrary precision, 150 // current value. Note that DER-encoded integers are arbitrary precision,
148 // so this method will fail for valid input that represents an integer 151 // so this method will fail for valid input that represents an integer
149 // outside the range of an int64. 152 // outside the range of an int64_t.
150 // 153 //
151 // Note that on failure the Parser is left in an undefined state (the 154 // Note that on failure the Parser is left in an undefined state (the
152 // input may or may not have been advanced). 155 // input may or may not have been advanced).
153 bool ReadUint64(uint64_t* out) WARN_UNUSED_RESULT; 156 bool ReadUint64(uint64_t* out) WARN_UNUSED_RESULT;
154 157
155 // Reads a BIT STRING. On success fills |out| and returns true. 158 // Reads a BIT STRING. On success fills |out| and returns true.
156 // 159 //
157 // Note that on failure the Parser is left in an undefined state (the 160 // Note that on failure the Parser is left in an undefined state (the
158 // input may or may not have been advanced). 161 // input may or may not have been advanced).
159 bool ReadBitString(BitString* out) WARN_UNUSED_RESULT; 162 bool ReadBitString(BitString* out) WARN_UNUSED_RESULT;
(...skipping 19 matching lines...) Expand all
179 Mark advance_mark_; 182 Mark advance_mark_;
180 183
181 DISALLOW_COPY(Parser); 184 DISALLOW_COPY(Parser);
182 }; 185 };
183 186
184 } // namespace der 187 } // namespace der
185 188
186 } // namespace net 189 } // namespace net
187 190
188 #endif // NET_DER_PARSER_H_ 191 #endif // NET_DER_PARSER_H_
OLDNEW
« no previous file with comments | « net/der/parse_values.h ('k') | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698