| 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 548 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 } |
| 569 |
| 570 // static |
| 571 bool ProfileManager::IsMultipleProfilesEnabled() { |
| 572 #if defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS) |
| 573 return true; |
| 574 #else |
| 575 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles); |
| 576 #endif |
| 577 } |
| OLD | NEW |