#include "extensions/browser/content_verifier/content_verifier_utils.h"
#include "base/strings/string_util.h"
namespace extensions {
namespace content_verifier_utils {
namespace {
#if BUILDFLAG(IS_WIN)
bool TrimDotSpaceSuffix(const base::FilePath::StringType& path,
base::FilePath::StringType* out_path) {
static_assert(IsDotSpaceFilenameSuffixIgnored(),
"dot-space suffix shouldn't be trimmed in current system");
base::FilePath::StringType::size_type trim_pos =
path.find_last_not_of(FILE_PATH_LITERAL(". "));
if (trim_pos == base::FilePath::StringType::npos)
return false;
*out_path = path.substr(0, trim_pos + 1);
return true;
}
#endif
}
CanonicalRelativePath CanonicalizeRelativePath(
const base::FilePath& relative_path) { … }
}
}