| 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 <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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 | 961 |
| 962 QueueProfileDirectoryForDeletion(profile_dir); | 962 QueueProfileDirectoryForDeletion(profile_dir); |
| 963 cache.DeleteProfileFromCache(profile_dir); | 963 cache.DeleteProfileFromCache(profile_dir); |
| 964 | 964 |
| 965 ProfileMetrics::LogNumberOfProfiles(this, | 965 ProfileMetrics::LogNumberOfProfiles(this, |
| 966 ProfileMetrics::DELETE_PROFILE_EVENT); | 966 ProfileMetrics::DELETE_PROFILE_EVENT); |
| 967 } | 967 } |
| 968 | 968 |
| 969 // static | 969 // static |
| 970 bool ProfileManager::IsMultipleProfilesEnabled() { | 970 bool ProfileManager::IsMultipleProfilesEnabled() { |
| 971 #if defined(OS_ANDROID) |
| 972 return false; |
| 973 #endif |
| 971 #if defined(OS_CHROMEOS) | 974 #if defined(OS_CHROMEOS) |
| 972 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) | 975 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) |
| 973 return false; | 976 return false; |
| 974 #endif | 977 #endif |
| 975 #if defined(OS_WIN) | 978 #if defined(OS_WIN) |
| 976 if (base::win::IsMetroProcess()) | 979 if (base::win::IsMetroProcess()) |
| 977 return false; | 980 return false; |
| 978 #endif | 981 #endif |
| 979 return !ManagedMode::IsInManagedMode(); | 982 return !ManagedMode::IsInManagedMode(); |
| 980 } | 983 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 } | 1018 } |
| 1016 | 1019 |
| 1017 ProfileManager::ProfileInfo::ProfileInfo(Profile* profile, bool created) | 1020 ProfileManager::ProfileInfo::ProfileInfo(Profile* profile, bool created) |
| 1018 : profile(profile), | 1021 : profile(profile), |
| 1019 created(created) { | 1022 created(created) { |
| 1020 } | 1023 } |
| 1021 | 1024 |
| 1022 ProfileManager::ProfileInfo::~ProfileInfo() { | 1025 ProfileManager::ProfileInfo::~ProfileInfo() { |
| 1023 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1026 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
| 1024 } | 1027 } |
| OLD | NEW |