| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/profiles/profile_manager.h" | 5 #include "chrome/browser/profiles/profile_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 // static | 196 // static |
| 197 void ProfileManager::NukeDeletedProfilesFromDisk() { | 197 void ProfileManager::NukeDeletedProfilesFromDisk() { |
| 198 for (std::vector<base::FilePath>::iterator it = | 198 for (std::vector<base::FilePath>::iterator it = |
| 199 ProfilesToDelete().begin(); | 199 ProfilesToDelete().begin(); |
| 200 it != ProfilesToDelete().end(); | 200 it != ProfilesToDelete().end(); |
| 201 ++it) { | 201 ++it) { |
| 202 // Delete both the profile directory and its corresponding cache. | 202 // Delete both the profile directory and its corresponding cache. |
| 203 base::FilePath cache_path; | 203 base::FilePath cache_path; |
| 204 chrome::GetUserCacheDirectory(*it, &cache_path); | 204 chrome::GetUserCacheDirectory(*it, &cache_path); |
| 205 file_util::Delete(*it, true); | 205 base::Delete(*it, true); |
| 206 file_util::Delete(cache_path, true); | 206 base::Delete(cache_path, true); |
| 207 } | 207 } |
| 208 ProfilesToDelete().clear(); | 208 ProfilesToDelete().clear(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 namespace { | 211 namespace { |
| 212 | 212 |
| 213 bool s_allow_get_default_profile = false; | 213 bool s_allow_get_default_profile = false; |
| 214 | 214 |
| 215 } // namespace | 215 } // namespace |
| 216 | 216 |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 ProfileManager::ProfileInfo::ProfileInfo( | 1213 ProfileManager::ProfileInfo::ProfileInfo( |
| 1214 Profile* profile, | 1214 Profile* profile, |
| 1215 bool created) | 1215 bool created) |
| 1216 : profile(profile), | 1216 : profile(profile), |
| 1217 created(created) { | 1217 created(created) { |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 ProfileManager::ProfileInfo::~ProfileInfo() { | 1220 ProfileManager::ProfileInfo::~ProfileInfo() { |
| 1221 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1221 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
| 1222 } | 1222 } |
| OLD | NEW |