Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 #ifndef ContentHeaderFieldInput_h | |
| 6 #define ContentHeaderFieldInput_h | |
| 7 | |
| 8 #include "platform/network/ParsedContentHeaderFieldParameters.h" | |
| 9 #include "platform/wtf/text/WTFString.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class ContentHeaderFieldInput final { | |
|
kinuko
2017/05/22 07:39:44
Please add a class-level comment.
It'd be probabl
yhirano
2017/05/22 07:51:20
Please write a class comment.
e_hakkinen
2017/05/22 08:11:58
Done.
| |
| 14 STACK_ALLOCATED(); | |
| 15 | |
| 16 public: | |
| 17 using Mode = ParsedContentHeaderFieldParameters::Mode; | |
| 18 | |
| 19 explicit ContentHeaderFieldInput(const String& header_field); | |
| 20 ContentHeaderFieldInput(ContentHeaderFieldInput&&); | |
| 21 | |
| 22 bool Consume(char); | |
|
yhirano
2017/05/22 07:51:20
It would be good to explain what the returned bool
e_hakkinen
2017/05/22 08:11:58
Done.
| |
| 23 bool ConsumeToken(Mode, StringView& output); | |
| 24 bool ConsumeTokenOrQuotedString(Mode, String& output); | |
| 25 unsigned Index() const { return index_; } | |
| 26 bool IsConsumed() const { return index_ >= input_.length(); } | |
| 27 void SkipSpaces(); | |
| 28 | |
| 29 private: | |
| 30 bool ConsumeQuotedString(String& output); | |
| 31 | |
| 32 unsigned index_; | |
| 33 const String input_; | |
| 34 }; | |
| 35 | |
| 36 } // namespace blink | |
| 37 | |
| 38 #endif | |
| OLD | NEW |