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

Side by Side Diff: sandbox/linux/tests/scoped_temporary_file.h

Issue 348853006: Linux sandbox: add test to ensure that pread64 can be forwarded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Exclude Android from new test. Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 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 SANDBOX_LINUX_TESTS_SCOPED_TEMPORARY_FILE_H_
6 #define SANDBOX_LINUX_TESTS_SCOPED_TEMPORARY_FILE_H_
7
8 #include "base/macros.h"
9
10 namespace sandbox {
11 // Creates and open a temporary file on creation and closes
12 // and removes it on destruction.
13 // Unlike base/ helpers, this does not require JNI on Android.
14 class ScopedTemporaryFile {
15 public:
16 ScopedTemporaryFile();
17 ~ScopedTemporaryFile();
18
19 int fd() const { return fd_; }
20 const char* full_file_name() const { return full_file_name_; }
21
22 private:
23 int fd_;
24 char full_file_name_[128];
25 DISALLOW_COPY_AND_ASSIGN(ScopedTemporaryFile);
26 };
27
28 } // namespace sandbox
29
30 #endif // SANDBOX_LINUX_TESTS_SCOPED_TEMPORARY_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698