| OLD | NEW |
| 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 #include "base/files/scoped_temp_dir.h" | 5 #include "base/files/scoped_temp_dir.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 | 11 |
| 12 ScopedTempDir::ScopedTempDir() { | 12 ScopedTempDir::ScopedTempDir() { |
| 13 } | 13 } |
| 14 | 14 |
| 15 ScopedTempDir::~ScopedTempDir() { | 15 ScopedTempDir::~ScopedTempDir() { |
| 16 if (!path_.empty() && !Delete()) | 16 if (!path_.empty() && !Delete()) |
| 17 DLOG(WARNING) << "Could not delete temp dir in dtor."; | 17 DLOG(WARNING) << "Could not delete temp dir in dtor."; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 FilePath ret = path_; | 74 FilePath ret = path_; |
| 75 path_ = FilePath(); | 75 path_ = FilePath(); |
| 76 return ret; | 76 return ret; |
| 77 } | 77 } |
| 78 | 78 |
| 79 bool ScopedTempDir::IsValid() const { | 79 bool ScopedTempDir::IsValid() const { |
| 80 return !path_.empty() && DirectoryExists(path_); | 80 return !path_.empty() && DirectoryExists(path_); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace base | 83 } // namespace base |
| OLD | NEW |