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

Side by Side Diff: components/policy/core/common/preg_parser_fuzzer.cc

Issue 2860973002: Allow PolicyLoadStatusSample to override reporting method (Closed)
Patch Set: Cleanups and class rename. Created 3 years, 7 months 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <base/strings/utf_string_conversions.h> 8 #include <base/strings/utf_string_conversions.h>
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 10
(...skipping 16 matching lines...) Expand all
27 logging::SetMinLogLevel(logging::LOG_FATAL); 27 logging::SetMinLogLevel(logging::LOG_FATAL);
28 } 28 }
29 29
30 const base::string16 root; 30 const base::string16 root;
31 }; 31 };
32 32
33 Environment* env = new Environment(); 33 Environment* env = new Environment();
34 34
35 // Entry point for LibFuzzer. 35 // Entry point for LibFuzzer.
36 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 36 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
37 // Note: Don't use PolicyLoadStatusUmaReporter here, it leaks!
38 PolicyLoadStatusSampler status;
37 RegistryDict dict; 39 RegistryDict dict;
38 PolicyLoadStatus status;
39 ReadDataInternal(data, size, env->root, &dict, &status, "data"); 40 ReadDataInternal(data, size, env->root, &dict, &status, "data");
40 return 0; 41 return 0;
41 } 42 }
42 43
43 } // namespace preg_parser 44 } // namespace preg_parser
44 } // namespace policy 45 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/preg_parser.cc ('k') | components/policy/core/common/preg_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698