Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(868)

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 691183002: Guest profile should reset the default search provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698