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

Side by Side Diff: util/test/scoped_temp_dir.h

Issue 867363003: win: Implementation of CrashReportDatabase for Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 10 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 | « util/misc/uuid.cc ('k') | util/test/scoped_temp_dir_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 18 matching lines...) Expand all
29 class ScopedTempDir { 29 class ScopedTempDir {
30 public: 30 public:
31 ScopedTempDir(); 31 ScopedTempDir();
32 ~ScopedTempDir(); 32 ~ScopedTempDir();
33 33
34 //! \brief Returns the path of the temporary directory. 34 //! \brief Returns the path of the temporary directory.
35 //! 35 //!
36 //! \return The temporary directory path. 36 //! \return The temporary directory path.
37 const base::FilePath& path() const { return path_; } 37 const base::FilePath& path() const { return path_; }
38 38
39 //! \brief Move the temporary directory to a new temporary location.
40 void Rename();
41
39 private: 42 private:
40 //! \brief Creates the temporary directory and asserts success of the 43 //! \brief Creates the temporary directory and asserts success of the
41 //! operation. 44 //! operation.
42 static base::FilePath CreateTemporaryDirectory(); 45 static base::FilePath CreateTemporaryDirectory();
43 46
44 //! \brief Removes all files and subdirectories at the given \a path, 47 //! \brief Removes all files and subdirectories at the given \a path,
45 //! including the \a path itself. 48 //! including the \a path itself.
46 //! 49 //!
47 //! Failures are recorded by gtest expectations. 50 //! Failures are recorded by gtest expectations.
48 //! 51 //!
49 //! \param[in] path The path to delete, along with its contents. This must 52 //! \param[in] path The path to delete, along with its contents. This must
50 //! reference a directory. 53 //! reference a directory.
51 static void RecursivelyDeleteTemporaryDirectory(const base::FilePath& path); 54 static void RecursivelyDeleteTemporaryDirectory(const base::FilePath& path);
52 55
53 const base::FilePath path_; 56 base::FilePath path_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(ScopedTempDir); 58 DISALLOW_COPY_AND_ASSIGN(ScopedTempDir);
56 }; 59 };
57 60
58 } // namespace test 61 } // namespace test
59 } // namespace crashpad 62 } // namespace crashpad
60 63
61 #endif // CRASHPAD_UTIL_TEST_SCOPED_TEMP_DIR_ 64 #endif // CRASHPAD_UTIL_TEST_SCOPED_TEMP_DIR_
OLDNEW
« no previous file with comments | « util/misc/uuid.cc ('k') | util/test/scoped_temp_dir_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698