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 #ifndef COMPONENTS_SAFE_JSON_JSON_SANITIZER_H_ | 5 #ifndef COMPONENTS_SAFE_JSON_JSON_SANITIZER_H_ |
6 #define COMPONENTS_SAFE_JSON_JSON_SANITIZER_H_ | 6 #define COMPONENTS_SAFE_JSON_JSON_SANITIZER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "build/build_config.h" |
13 | 15 |
14 #if defined(OS_ANDROID) | 16 #if defined(OS_ANDROID) |
15 #include <jni.h> | 17 #include <jni.h> |
16 #endif | 18 #endif |
17 | 19 |
18 namespace safe_json { | 20 namespace safe_json { |
19 | 21 |
20 // Sanitizes and normalizes JSON by parsing it in a safe environment and | 22 // Sanitizes and normalizes JSON by parsing it in a safe environment and |
21 // re-serializing it. Parsing the sanitized JSON should result in a value | 23 // re-serializing it. Parsing the sanitized JSON should result in a value |
22 // identical to parsing the original JSON. | 24 // identical to parsing the original JSON. |
(...skipping 20 matching lines...) Expand all Loading... |
43 JsonSanitizer() {} | 45 JsonSanitizer() {} |
44 ~JsonSanitizer() {} | 46 ~JsonSanitizer() {} |
45 | 47 |
46 private: | 48 private: |
47 DISALLOW_COPY_AND_ASSIGN(JsonSanitizer); | 49 DISALLOW_COPY_AND_ASSIGN(JsonSanitizer); |
48 }; | 50 }; |
49 | 51 |
50 } // namespace safe_json | 52 } // namespace safe_json |
51 | 53 |
52 #endif // COMPONENTS_SAFE_JSON_JSON_SANITIZER_H_ | 54 #endif // COMPONENTS_SAFE_JSON_JSON_SANITIZER_H_ |
OLD | NEW |