summaryrefslogtreecommitdiffstats
path: root/base/files/scoped_platform_file_closer.cc
blob: 44f67521b8820e3424f568f063bbeb8988302f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/files/scoped_platform_file_closer.h"

namespace base {
namespace internal {

void PlatformFileCloser::operator()(PlatformFile* file) const {
  if (file && *file != kInvalidPlatformFileValue)
    ClosePlatformFile(*file);
}

}  // namespace internal
}  // namespace base