Pass correct flags for use_lto==1 with Clang.
[chromium-blink-merge.git] / ipc / ipc_platform_file_attachment.h
blobc4c22a3c091518f9eca31de7716e9bd98fcae7b5
1 // Copyright (c) 2015 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 IPC_IPC_PLATFORM_FILE_ATTACHMENT_H_
6 #define IPC_IPC_PLATFORM_FILE_ATTACHMENT_H_
8 #include "base/files/file.h"
9 #include "ipc/ipc_message_attachment.h"
11 namespace IPC {
12 namespace internal {
14 // A platform file that is sent over |Channel| as a part of |Message|.
15 // |PlatformFileAttachment| doesn't own |file_|. The lifecycle of |file_| is
16 // managed by |MessageAttachmentSet|.
17 class PlatformFileAttachment : public MessageAttachment {
18 public:
19 explicit PlatformFileAttachment(base::PlatformFile file);
21 Type GetType() const override;
22 base::PlatformFile file() const { return file_; }
24 private:
25 ~PlatformFileAttachment() override;
27 base::PlatformFile file_;
30 base::PlatformFile GetPlatformFile(scoped_refptr<MessageAttachment> attachment);
32 } // namespace internal
33 } // namespace IPC
35 #endif // IPC_IPC_PLATFORM_FILE_ATTACHMENT_H_