| 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 <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "net/url_request/url_request_job.h" | 36 #include "net/url_request/url_request_job.h" |
| 37 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 38 | 38 |
| 39 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
| 40 #include "chrome/browser/chromeos/cros/cros_library.h" | 40 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 41 #include "chrome/browser/chromeos/cros/cryptohome_library.h" | 41 #include "chrome/browser/chromeos/cros/cryptohome_library.h" |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 void DeleteProfileDirectories(std::vector<FilePath> paths) { | 46 void DeleteProfileDirectories(const std::vector<FilePath>& paths) { |
| 47 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 47 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 48 for (std::vector<FilePath>::iterator it = paths.begin(); | 48 for (std::vector<FilePath>::const_iterator it = paths.begin(); |
| 49 it != paths.end(); ++it) { | 49 it != paths.end(); ++it) { |
| 50 file_util::Delete(*it, true); | 50 file_util::Delete(*it, true); |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 bool ProfileManagerObserver::DeleteAfterCreation() { | 56 bool ProfileManagerObserver::DeleteAfterCreation() { |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 void ProfileManager::ScheduleProfileForDeletion(const FilePath& profile_dir) { | 559 void ProfileManager::ScheduleProfileForDeletion(const FilePath& profile_dir) { |
| 560 // TODO(sail): Due to bug 88586 we don't delete the profile instance. Once we | 560 // TODO(sail): Due to bug 88586 we don't delete the profile instance. Once we |
| 561 // start deleting the profile instance we need to close background apps too. | 561 // start deleting the profile instance we need to close background apps too. |
| 562 Profile* profile = GetProfileByPath(profile_dir); | 562 Profile* profile = GetProfileByPath(profile_dir); |
| 563 if (profile) | 563 if (profile) |
| 564 BrowserList::CloseAllBrowsersWithProfile(profile); | 564 BrowserList::CloseAllBrowsersWithProfile(profile); |
| 565 profiles_to_delete_.push_back(profile_dir); | 565 profiles_to_delete_.push_back(profile_dir); |
| 566 ProfileInfoCache& cache = GetProfileInfoCache(); | 566 ProfileInfoCache& cache = GetProfileInfoCache(); |
| 567 cache.DeleteProfileFromCache(profile_dir); | 567 cache.DeleteProfileFromCache(profile_dir); |
| 568 } | 568 } |
| OLD | NEW |