| 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 "ui/base/template_expressions.h" | 5 #include "ui/base/template_expressions.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 switch (c) { | 24 switch (c) { |
| 25 case '\\': | 25 case '\\': |
| 26 out.append("\\\\"); | 26 out.append("\\\\"); |
| 27 break; | 27 break; |
| 28 case '\'': | 28 case '\'': |
| 29 out.append("\\'"); | 29 out.append("\\'"); |
| 30 break; | 30 break; |
| 31 case '"': | 31 case '"': |
| 32 out.append("\\\""); | 32 out.append("\\\""); |
| 33 break; | 33 break; |
| 34 case ',': |
| 35 out.append("\\,"); |
| 36 break; |
| 34 default: | 37 default: |
| 35 out += c; | 38 out += c; |
| 36 } | 39 } |
| 37 } | 40 } |
| 38 return out; | 41 return out; |
| 39 } | 42 } |
| 40 | 43 |
| 41 } // namespace | 44 } // namespace |
| 42 | 45 |
| 43 namespace ui { | 46 namespace ui { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 111 } |
| 109 | 112 |
| 110 formatted.append(replacement); | 113 formatted.append(replacement); |
| 111 | 114 |
| 112 current_pos = key_end + sizeof(kKeyClose); | 115 current_pos = key_end + sizeof(kKeyClose); |
| 113 } | 116 } |
| 114 return formatted; | 117 return formatted; |
| 115 } | 118 } |
| 116 | 119 |
| 117 } // namespace ui | 120 } // namespace ui |
| OLD | NEW |