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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 for (it = active_profiles_.begin(); it != active_profiles_.end(); ++it) { | 1063 for (it = active_profiles_.begin(); it != active_profiles_.end(); ++it) { |
1064 std::string profile_path = (*it)->GetPath().BaseName().MaybeAsASCII(); | 1064 std::string profile_path = (*it)->GetPath().BaseName().MaybeAsASCII(); |
1065 // Some profiles might become ephemeral after they are created. | 1065 // Some profiles might become ephemeral after they are created. |
1066 // Don't persist the System Profile as one of the last actives, it should | 1066 // Don't persist the System Profile as one of the last actives, it should |
1067 // never get a browser. | 1067 // never get a browser. |
1068 if (!(*it)->GetPrefs()->GetBoolean(prefs::kForceEphemeralProfiles) && | 1068 if (!(*it)->GetPrefs()->GetBoolean(prefs::kForceEphemeralProfiles) && |
1069 profile_paths.find(profile_path) == profile_paths.end() && | 1069 profile_paths.find(profile_path) == profile_paths.end() && |
1070 profile_path != | 1070 profile_path != |
1071 base::FilePath(chrome::kSystemProfileDir).AsUTF8Unsafe()) { | 1071 base::FilePath(chrome::kSystemProfileDir).AsUTF8Unsafe()) { |
1072 profile_paths.insert(profile_path); | 1072 profile_paths.insert(profile_path); |
1073 profile_list->Append(new base::StringValue(profile_path)); | 1073 profile_list->AppendString(profile_path); |
1074 } | 1074 } |
1075 } | 1075 } |
1076 } | 1076 } |
1077 } | 1077 } |
1078 | 1078 |
1079 void ProfileManager::OnProfileCreated(Profile* profile, | 1079 void ProfileManager::OnProfileCreated(Profile* profile, |
1080 bool success, | 1080 bool success, |
1081 bool is_new_profile) { | 1081 bool is_new_profile) { |
1082 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1082 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1083 | 1083 |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 | 1636 |
1637 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1637 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
1638 if (!original_callback.is_null()) | 1638 if (!original_callback.is_null()) |
1639 original_callback.Run(loaded_profile, status); | 1639 original_callback.Run(loaded_profile, status); |
1640 } | 1640 } |
1641 #endif // !defined(OS_ANDROID) | 1641 #endif // !defined(OS_ANDROID) |
1642 | 1642 |
1643 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1643 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1644 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1644 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1645 } | 1645 } |
OLD | NEW |