Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: content/browser/file_descriptor_info_impl.h

Issue 585203002: Turn FileDescriptorInfo a collection class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/browser/file_descriptor_info_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_IMPL_H_
6 #define CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_IMPL_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h"
10 #include "content/common/content_export.h"
11 #include "content/public/browser/file_descriptor_info.h"
12
13 namespace content {
14
15 class FileDescriptorInfoImpl : public FileDescriptorInfo {
16 public:
17 CONTENT_EXPORT static scoped_ptr<FileDescriptorInfo> Create();
18
19 virtual ~FileDescriptorInfoImpl();
20 virtual void Share(int id, base::PlatformFile fd) OVERRIDE;
21 virtual void Transfer(int id, base::ScopedFD fd) OVERRIDE;
22 virtual const base::FileHandleMappingVector& GetMapping() const OVERRIDE;
23 virtual base::FileHandleMappingVector GetMappingWithIDAdjustment(
24 int delta) const OVERRIDE;
25 virtual base::PlatformFile GetFDAt(size_t i) const OVERRIDE;
26 virtual int GetIDAt(size_t i) const OVERRIDE;
27 virtual size_t GetMappingSize() const OVERRIDE;
28
29 private:
30 FileDescriptorInfoImpl();
31
32 void AddToMapping(int id, base::PlatformFile fd);
33 bool HasID(int id) const;
34 base::FileHandleMappingVector mapping_;
35 ScopedVector<base::ScopedFD> owned_descriptors_;
36 };
37 }
38
39 #endif // CONTENT_PUBLIC_BROWSER_FILE_DESCRIPTOR_INFO_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/browser/file_descriptor_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698