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

Side by Side Diff: base/memory/scoped_temp_dir.cc

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 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/memory/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 9
10 ScopedTempDir::ScopedTempDir() { 10 ScopedTempDir::ScopedTempDir() {
11 } 11 }
12 12
13 ScopedTempDir::~ScopedTempDir() { 13 ScopedTempDir::~ScopedTempDir() {
14 if (!path_.empty() && !Delete()) 14 if (!path_.empty() && !Delete())
15 LOG(WARNING) << "Could not delete temp dir in dtor."; 15 LOG(WARNING) << "Could not delete temp dir in dtor.";
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 FilePath ScopedTempDir::Take() { 76 FilePath ScopedTempDir::Take() {
77 FilePath ret = path_; 77 FilePath ret = path_;
78 path_ = FilePath(); 78 path_ = FilePath();
79 return ret; 79 return ret;
80 } 80 }
81 81
82 bool ScopedTempDir::IsValid() const { 82 bool ScopedTempDir::IsValid() const {
83 return !path_.empty() && file_util::DirectoryExists(path_); 83 return !path_.empty() && file_util::DirectoryExists(path_);
84 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698