Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ppapi / shared_impl / file_ref_util.h
blobf85527daeff790b3ce51efc3903294c0477a45ef
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 "ppapi/shared_impl/ppapi_shared_export.h"
12 namespace base {
13 class FilePath;
16 namespace ppapi {
18 // Routines to generate display names for internal and external file paths.
19 PPAPI_SHARED_EXPORT std::string GetNameForInternalFilePath(
20 const std::string& path);
21 PPAPI_SHARED_EXPORT std::string GetNameForExternalFilePath(
22 const base::FilePath& path);
24 // Determines whether an internal file path is valid.
25 PPAPI_SHARED_EXPORT bool IsValidInternalPath(const std::string& path);
27 // Determines whether an external file path is valid.
28 PPAPI_SHARED_EXPORT bool IsValidExternalPath(const base::FilePath& path);
30 // If path ends with a slash, normalize it away unless it's the root path.
31 PPAPI_SHARED_EXPORT void NormalizeInternalPath(std::string* path);
33 } // namespace ppapi
35 #endif // PPAPI_SHARED_IMPL_FILE_REF_UTIL_H_