| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 ProfileManager::FindOrCreateNewWindowForProfile( | 157 ProfileManager::FindOrCreateNewWindowForProfile( |
| 158 profile, | 158 profile, |
| 159 browser::startup::IS_PROCESS_STARTUP, | 159 browser::startup::IS_PROCESS_STARTUP, |
| 160 browser::startup::IS_FIRST_RUN, | 160 browser::startup::IS_FIRST_RUN, |
| 161 false); | 161 false); |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace | 165 } // namespace |
| 166 | 166 |
| 167 // static |
| 168 #if defined(OS_CHROMEOS) |
| 169 const char ProfileManager::kTestUserProfile[] = "test-user"; |
| 170 #else |
| 171 const char ProfileManager::kTestUserProfile[] = "Default"; |
| 172 #endif |
| 173 |
| 167 #if defined(ENABLE_SESSION_SERVICE) | 174 #if defined(ENABLE_SESSION_SERVICE) |
| 168 // static | 175 // static |
| 169 void ProfileManager::ShutdownSessionServices() { | 176 void ProfileManager::ShutdownSessionServices() { |
| 170 ProfileManager* pm = g_browser_process->profile_manager(); | 177 ProfileManager* pm = g_browser_process->profile_manager(); |
| 171 if (!pm) // Is NULL when running unit tests. | 178 if (!pm) // Is NULL when running unit tests. |
| 172 return; | 179 return; |
| 173 std::vector<Profile*> profiles(pm->GetLoadedProfiles()); | 180 std::vector<Profile*> profiles(pm->GetLoadedProfiles()); |
| 174 for (size_t i = 0; i < profiles.size(); ++i) | 181 for (size_t i = 0; i < profiles.size(); ++i) |
| 175 SessionServiceFactory::ShutdownForProfile(profiles[i]); | 182 SessionServiceFactory::ShutdownForProfile(profiles[i]); |
| 176 } | 183 } |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, | 993 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, |
| 987 Profile* profile, | 994 Profile* profile, |
| 988 Profile::CreateStatus status) { | 995 Profile::CreateStatus status) { |
| 989 for (size_t i = 0; i < callbacks.size(); ++i) | 996 for (size_t i = 0; i < callbacks.size(); ++i) |
| 990 callbacks[i].Run(profile, status); | 997 callbacks[i].Run(profile, status); |
| 991 } | 998 } |
| 992 | 999 |
| 993 ProfileManager::ProfileInfo::~ProfileInfo() { | 1000 ProfileManager::ProfileInfo::~ProfileInfo() { |
| 994 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1001 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
| 995 } | 1002 } |
| OLD | NEW |