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

Side by Side Diff: base/scoped_temp_dir.cc

Issue 3119022: Header cleanup in base.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/scoped_temp_dir.h" 5 #include "base/scoped_temp_dir.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h"
10 9
11 ScopedTempDir::ScopedTempDir() { 10 ScopedTempDir::ScopedTempDir() {
12 } 11 }
13 12
14 ScopedTempDir::~ScopedTempDir() { 13 ScopedTempDir::~ScopedTempDir() {
15 if (!path_.empty() && !file_util::Delete(path_, true)) 14 if (!path_.empty() && !file_util::Delete(path_, true))
16 LOG(ERROR) << "ScopedTempDir unable to delete " << path_.value(); 15 LOG(ERROR) << "ScopedTempDir unable to delete " << path_.value();
17 } 16 }
18 17
19 bool ScopedTempDir::CreateUniqueTempDir() { 18 bool ScopedTempDir::CreateUniqueTempDir() {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 52
54 FilePath ScopedTempDir::Take() { 53 FilePath ScopedTempDir::Take() {
55 FilePath ret = path_; 54 FilePath ret = path_;
56 path_ = FilePath(); 55 path_ = FilePath();
57 return ret; 56 return ret;
58 } 57 }
59 58
60 bool ScopedTempDir::IsValid() const { 59 bool ScopedTempDir::IsValid() const {
61 return !path_.empty() && file_util::DirectoryExists(path_); 60 return !path_.empty() && file_util::DirectoryExists(path_);
62 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698