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 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 cache.SetProfileIsEphemeralAtIndex( | 1195 cache.SetProfileIsEphemeralAtIndex( |
1196 cache.GetIndexOfProfileWithPath(profile->GetPath()), true); | 1196 cache.GetIndexOfProfileWithPath(profile->GetPath()), true); |
1197 } | 1197 } |
1198 } | 1198 } |
1199 | 1199 |
1200 void ProfileManager::SetGuestProfilePrefs(Profile* profile) { | 1200 void ProfileManager::SetGuestProfilePrefs(Profile* profile) { |
1201 PrefService* prefs = profile->GetPrefs(); | 1201 PrefService* prefs = profile->GetPrefs(); |
1202 prefs->SetBoolean(prefs::kSigninAllowed, false); | 1202 prefs->SetBoolean(prefs::kSigninAllowed, false); |
1203 prefs->SetBoolean(bookmarks::prefs::kEditBookmarksEnabled, false); | 1203 prefs->SetBoolean(bookmarks::prefs::kEditBookmarksEnabled, false); |
1204 prefs->SetBoolean(bookmarks::prefs::kShowBookmarkBar, false); | 1204 prefs->SetBoolean(bookmarks::prefs::kShowBookmarkBar, false); |
| 1205 prefs->ClearPref(DefaultSearchManager::kDefaultSearchProviderDataPrefName); |
1205 // This can be removed in the future but needs to be present through | 1206 // This can be removed in the future but needs to be present through |
1206 // a release (or two) so that any existing installs get switched to | 1207 // a release (or two) so that any existing installs get switched to |
1207 // the new state and away from the previous "forced" state. | 1208 // the new state and away from the previous "forced" state. |
1208 IncognitoModePrefs::SetAvailability(prefs, IncognitoModePrefs::ENABLED); | 1209 IncognitoModePrefs::SetAvailability(prefs, IncognitoModePrefs::ENABLED); |
1209 } | 1210 } |
1210 | 1211 |
1211 bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { | 1212 bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { |
1212 #if defined(OS_CHROMEOS) | 1213 #if defined(OS_CHROMEOS) |
1213 if (profile->GetPath().BaseName().value() == chrome::kInitialProfile) { | 1214 if (profile->GetPath().BaseName().value() == chrome::kInitialProfile) { |
1214 return true; | 1215 return true; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1329 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
1329 FinishDeletingProfile(profile_to_delete_path); | 1330 FinishDeletingProfile(profile_to_delete_path); |
1330 } | 1331 } |
1331 } | 1332 } |
1332 } | 1333 } |
1333 #endif | 1334 #endif |
1334 | 1335 |
1335 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1336 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1336 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1337 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1337 } | 1338 } |
OLD | NEW |