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

Side by Side Diff: base/scoped_temp_dir.h

Issue 7461141: Rename BASE_API to BASE_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
« no previous file with comments | « base/scoped_native_library.h ('k') | base/sha1.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_SCOPED_TEMP_DIR_H_ 5 #ifndef BASE_SCOPED_TEMP_DIR_H_
6 #define BASE_SCOPED_TEMP_DIR_H_ 6 #define BASE_SCOPED_TEMP_DIR_H_
7 #pragma once 7 #pragma once
8 8
9 // An object representing a temporary / scratch directory that should be cleaned 9 // An object representing a temporary / scratch directory that should be cleaned
10 // up (recursively) when this object goes out of scope. Note that since 10 // up (recursively) when this object goes out of scope. Note that since
11 // deletion occurs during the destructor, no further error handling is possible 11 // deletion occurs during the destructor, no further error handling is possible
12 // if the directory fails to be deleted. As a result, deletion is not 12 // if the directory fails to be deleted. As a result, deletion is not
13 // guaranteed by this class. 13 // guaranteed by this class.
14 // 14 //
15 // Multiple calls to the methods which establish a temporary directory 15 // Multiple calls to the methods which establish a temporary directory
16 // (CreateUniqueTempDir, CreateUniqueTempDirUnderPath, and Set) must have 16 // (CreateUniqueTempDir, CreateUniqueTempDirUnderPath, and Set) must have
17 // intervening calls to Delete or Take, or the calls will fail. 17 // intervening calls to Delete or Take, or the calls will fail.
18 18
19 #include "base/base_api.h" 19 #include "base/base_export.h"
20 #include "base/file_path.h" 20 #include "base/file_path.h"
21 21
22 class BASE_API ScopedTempDir { 22 class BASE_EXPORT ScopedTempDir {
23 public: 23 public:
24 // No directory is owned/created initially. 24 // No directory is owned/created initially.
25 ScopedTempDir(); 25 ScopedTempDir();
26 26
27 // Recursively delete path. 27 // Recursively delete path.
28 ~ScopedTempDir(); 28 ~ScopedTempDir();
29 29
30 // Creates a unique directory in TempPath, and takes ownership of it. 30 // Creates a unique directory in TempPath, and takes ownership of it.
31 // See file_util::CreateNewTemporaryDirectory. 31 // See file_util::CreateNewTemporaryDirectory.
32 bool CreateUniqueTempDir() WARN_UNUSED_RESULT; 32 bool CreateUniqueTempDir() WARN_UNUSED_RESULT;
(...skipping 17 matching lines...) Expand all
50 // Returns true if path_ is non-empty and exists. 50 // Returns true if path_ is non-empty and exists.
51 bool IsValid() const; 51 bool IsValid() const;
52 52
53 private: 53 private:
54 FilePath path_; 54 FilePath path_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(ScopedTempDir); 56 DISALLOW_COPY_AND_ASSIGN(ScopedTempDir);
57 }; 57 };
58 58
59 #endif // BASE_SCOPED_TEMP_DIR_H_ 59 #endif // BASE_SCOPED_TEMP_DIR_H_
OLDNEW
« no previous file with comments | « base/scoped_native_library.h ('k') | base/sha1.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698