summaryrefslogtreecommitdiffstats
path: root/base/files/scoped_platform_file_closer.h
blob: 8fe4a2851180edcb708e31c76c5fda57c7fb9156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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.

#ifndef BASE_FILES_SCOPED_PLATFORM_FILE_CLOSER_H_
#define BASE_FILES_SCOPED_PLATFORM_FILE_CLOSER_H_

#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"

namespace base {

namespace internal {

struct BASE_EXPORT PlatformFileCloser {
  void operator()(PlatformFile* file) const;
};

}  // namespace internal

typedef scoped_ptr<PlatformFile, internal::PlatformFileCloser>
    ScopedPlatformFileCloser;

}  // namespace base

#endif  // BASE_FILES_SCOPED_PLATFORM_FILE_CLOSER_H_