Index: base/test/fuzzed_data_provider.h |
diff --git a/base/test/fuzzed_data_provider.h b/base/test/fuzzed_data_provider.h |
index 293d723904f4fec680e603ed711b7c3b1841dac8..06028242a384ade7670ee1bbe5282082fec74a87 100644 |
--- a/base/test/fuzzed_data_provider.h |
+++ b/base/test/fuzzed_data_provider.h |
@@ -6,6 +6,7 @@ |
#define BASE_TEST_FUZZED_DATA_PROVIDER_H_ |
#include <stdint.h> |
+#include <string> |
Lei Zhang
2016/10/19 17:49:49
nit: Chromium style still likes to have a separato
Charlie Harrison
2016/10/19 18:00:56
Done.
|
#include "base/base_export.h" |
#include "base/macros.h" |
@@ -23,16 +24,13 @@ class FuzzedDataProvider { |
FuzzedDataProvider(const uint8_t* data, size_t size); |
~FuzzedDataProvider(); |
- // Returns a StringPiece containing |num_bytes| of input data. If fewer than |
- // |num_bytes| of data remain, returns a shorter StringPiece containing all |
- // of the data that's left. The data pointed at by the returned StringPiece |
- // must not be used after the FuzzedDataProvider is destroyed. |
- StringPiece ConsumeBytes(size_t num_bytes); |
+ // Returns a std::string containing |num_bytes| of input data. If fewer than |
+ // |num_bytes| of data remain, returns a shorter std::string containing all |
+ // of the data that's left. |
+ std::string ConsumeBytes(size_t num_bytes); |
- // Returns a StringPiece containing all remaining bytes of the input data. |
- // The data pointed at by the returned StringPiece must not be used after the |
- // FuzzedDataProvider is destroyed. |
- StringPiece ConsumeRemainingBytes(); |
+ // Returns a std::string containing all remaining bytes of the input data. |
+ std::string ConsumeRemainingBytes(); |
// Returns a number in the range [min, max] by consuming bytes from the input |
// data. The value might not be uniformly distributed in the given range. If |