Save errno for logging before potentially overwriting it.
[chromium-blink-merge.git] / ppapi / shared_impl / file_ref_util.h
blob11f03ad17feb7cee4be7f0fa5785d2eceb179b99
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef PPAPI_SHARED_IMPL_FILE_REF_UTIL_H_
6 #define PPAPI_SHARED_IMPL_FILE_REF_UTIL_H_
8 #include <string>
10 #include "base/files/file_path.h"
11 #include "ppapi/shared_impl/ppapi_shared_export.h"
13 namespace ppapi {
15 // Routines to generate display names for internal and external file paths.
16 PPAPI_SHARED_EXPORT std::string GetNameForInternalFilePath(
17 const std::string& path);
18 PPAPI_SHARED_EXPORT std::string GetNameForExternalFilePath(
19 const base::FilePath& path);
21 // Determines whether an internal file path is valid.
22 PPAPI_SHARED_EXPORT bool IsValidInternalPath(const std::string& path);
24 // If path ends with a slash, normalize it away unless it's the root path.
25 PPAPI_SHARED_EXPORT void NormalizeInternalPath(std::string* path);
27 } // namespace ppapi
29 #endif // PPAPI_SHARED_IMPL_FILE_REF_UTIL_H_