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 <set> | 7 #include <set> |
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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 | 1169 |
1170 if (profile->GetPrefs()->GetBoolean(prefs::kForceEphemeralProfiles)) { | 1170 if (profile->GetPrefs()->GetBoolean(prefs::kForceEphemeralProfiles)) { |
1171 cache.SetProfileIsEphemeralAtIndex( | 1171 cache.SetProfileIsEphemeralAtIndex( |
1172 cache.GetIndexOfProfileWithPath(profile->GetPath()), true); | 1172 cache.GetIndexOfProfileWithPath(profile->GetPath()), true); |
1173 } | 1173 } |
1174 } | 1174 } |
1175 | 1175 |
1176 void ProfileManager::SetGuestProfilePrefs(Profile* profile) { | 1176 void ProfileManager::SetGuestProfilePrefs(Profile* profile) { |
1177 PrefService* prefs = profile->GetPrefs(); | 1177 PrefService* prefs = profile->GetPrefs(); |
1178 prefs->SetBoolean(prefs::kSigninAllowed, false); | 1178 prefs->SetBoolean(prefs::kSigninAllowed, false); |
1179 prefs->SetBoolean(prefs::kEditBookmarksEnabled, false); | 1179 prefs->SetBoolean(bookmarks::prefs::kEditBookmarksEnabled, false); |
1180 prefs->SetBoolean(prefs::kShowBookmarkBar, false); | 1180 prefs->SetBoolean(bookmarks::prefs::kShowBookmarkBar, false); |
1181 // This can be removed in the future but needs to be present through | 1181 // This can be removed in the future but needs to be present through |
1182 // a release (or two) so that any existing installs get switched to | 1182 // a release (or two) so that any existing installs get switched to |
1183 // the new state and away from the previous "forced" state. | 1183 // the new state and away from the previous "forced" state. |
1184 IncognitoModePrefs::SetAvailability(prefs, IncognitoModePrefs::ENABLED); | 1184 IncognitoModePrefs::SetAvailability(prefs, IncognitoModePrefs::ENABLED); |
1185 } | 1185 } |
1186 | 1186 |
1187 bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { | 1187 bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { |
1188 #if defined(OS_CHROMEOS) | 1188 #if defined(OS_CHROMEOS) |
1189 if (profile->GetPath().BaseName().value() == chrome::kInitialProfile) { | 1189 if (profile->GetPath().BaseName().value() == chrome::kInitialProfile) { |
1190 return true; | 1190 return true; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1301 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
1302 FinishDeletingProfile(profile_to_delete_path); | 1302 FinishDeletingProfile(profile_to_delete_path); |
1303 } | 1303 } |
1304 } | 1304 } |
1305 } | 1305 } |
1306 #endif | 1306 #endif |
1307 | 1307 |
1308 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1308 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1309 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1309 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1310 } | 1310 } |
OLD | NEW |