security/sandbox/chromium/base/platform_file.cc

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/sandbox/chromium/base/platform_file.cc	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +
     1.8 +#include "base/platform_file.h"
     1.9 +
    1.10 +namespace base {
    1.11 +
    1.12 +PlatformFileInfo::PlatformFileInfo()
    1.13 +    : size(0),
    1.14 +      is_directory(false),
    1.15 +      is_symbolic_link(false) {
    1.16 +}
    1.17 +
    1.18 +PlatformFileInfo::~PlatformFileInfo() {}
    1.19 +
    1.20 +#if !defined(OS_NACL)
    1.21 +PlatformFile CreatePlatformFile(const FilePath& name,
    1.22 +                                int flags,
    1.23 +                                bool* created,
    1.24 +                                PlatformFileError* error) {
    1.25 +  if (name.ReferencesParent()) {
    1.26 +    if (error)
    1.27 +      *error = PLATFORM_FILE_ERROR_ACCESS_DENIED;
    1.28 +    return kInvalidPlatformFileValue;
    1.29 +  }
    1.30 +  return CreatePlatformFileUnsafe(name, flags, created, error);
    1.31 +}
    1.32 +#endif
    1.33 +
    1.34 +}  // namespace base

mercurial