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

Side by Side Diff: chrome/installer/util/self_cleaning_temp_dir.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 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 "chrome/installer/util/self_cleaning_temp_dir.h" 5 #include "chrome/installer/util/self_cleaning_temp_dir.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 if (!path().empty()) { 52 if (!path().empty()) {
53 LOG(DFATAL) << "Attempting to re-initialize a SelfSelfCleaningTempDir."; 53 LOG(DFATAL) << "Attempting to re-initialize a SelfSelfCleaningTempDir.";
54 return false; 54 return false;
55 } 55 }
56 56
57 base::FilePath temp_dir(parent_dir.Append(temp_name)); 57 base::FilePath temp_dir(parent_dir.Append(temp_name));
58 base::FilePath base_dir; 58 base::FilePath base_dir;
59 GetTopDirToCreate(parent_dir, &base_dir); 59 GetTopDirToCreate(parent_dir, &base_dir);
60 60
61 if (file_util::CreateDirectory(temp_dir)) { 61 if (base::CreateDirectory(temp_dir)) {
62 base_dir_ = base_dir; 62 base_dir_ = base_dir;
63 temp_dir_ = temp_dir; 63 temp_dir_ = temp_dir;
64 return true; 64 return true;
65 } 65 }
66 66
67 return false; 67 return false;
68 } 68 }
69 69
70 bool SelfCleaningTempDir::Delete() { 70 bool SelfCleaningTempDir::Delete() {
71 if (path().empty()) { 71 if (path().empty()) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } while (true); 109 } while (true);
110 } 110 }
111 111
112 base_dir_.clear(); 112 base_dir_.clear();
113 temp_dir_.clear(); 113 temp_dir_.clear();
114 114
115 return true; 115 return true;
116 } 116 }
117 117
118 } // namespace installer 118 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/move_tree_work_item_unittest.cc ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698