| OLD | NEW |
| 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 #include "base/macros.h" |
| 5 #include "uri_encoder.h" | 6 #include "uri_encoder.h" |
| 6 | 7 |
| 7 using base::StringPiece; | 8 using base::StringPiece; |
| 8 | 9 |
| 9 namespace { | 10 namespace { |
| 10 | 11 |
| 11 struct expansion { | 12 struct expansion { |
| 12 uint8_t code; | 13 uint8_t code; |
| 13 const char* value; | 14 const char* value; |
| 14 }; | 15 }; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 if (i == 0) | 123 if (i == 0) |
| 123 exp = LookupPrefixExpansionByCode(input, i); | 124 exp = LookupPrefixExpansionByCode(input, i); |
| 124 else | 125 else |
| 125 exp = LookupExpansionByCode(input, i); | 126 exp = LookupExpansionByCode(input, i); |
| 126 if (exp == NULL) | 127 if (exp == NULL) |
| 127 output.push_back(static_cast<char>(input[i])); | 128 output.push_back(static_cast<char>(input[i])); |
| 128 else | 129 else |
| 129 output.append(exp->value); | 130 output.append(exp->value); |
| 130 } | 131 } |
| 131 } | 132 } |
| OLD | NEW |