| 20 | namespace |
| 21 | { |
| 22 | std::string RandomString(size_t length) |
| 23 | { |
| 24 | /// @todo Used for temp file name, so lower-upper case is strange here, no? |
| 25 | static std::string_view constexpr kCharset = |
| 26 | "0123456789" |
| 27 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 28 | "abcdefghijklmnopqrstuvwxyz"; |
| 29 | |
| 30 | base::UniformRandom<size_t> rand(0, kCharset.size() - 1); |
| 31 | std::string str(length, 0); |
| 32 | std::generate_n(str.begin(), length, [&rand]() { return kCharset[rand()]; }); |
| 33 | return str; |
| 34 | } |
| 35 | |
| 36 | inline bool IsSpecialDirName(std::string const & dirName) |
| 37 | { |
no test coverage detected