| 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 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 void ProfileManager::SetNonPersonalProfilePrefs(Profile* profile) { | 1484 void ProfileManager::SetNonPersonalProfilePrefs(Profile* profile) { |
| 1485 PrefService* prefs = profile->GetPrefs(); | 1485 PrefService* prefs = profile->GetPrefs(); |
| 1486 prefs->SetBoolean(prefs::kSigninAllowed, false); | 1486 prefs->SetBoolean(prefs::kSigninAllowed, false); |
| 1487 prefs->SetBoolean(bookmarks::prefs::kEditBookmarksEnabled, false); | 1487 prefs->SetBoolean(bookmarks::prefs::kEditBookmarksEnabled, false); |
| 1488 prefs->SetBoolean(bookmarks::prefs::kShowBookmarkBar, false); | 1488 prefs->SetBoolean(bookmarks::prefs::kShowBookmarkBar, false); |
| 1489 prefs->ClearPref(DefaultSearchManager::kDefaultSearchProviderDataPrefName); | 1489 prefs->ClearPref(DefaultSearchManager::kDefaultSearchProviderDataPrefName); |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { | 1492 bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) { |
| 1493 #if defined(OS_CHROMEOS) | 1493 #if defined(OS_CHROMEOS) |
| 1494 if (profile->GetPath().BaseName().value() == chrome::kInitialProfile) { | 1494 if (chromeos::ProfileHelper::IsSigninProfile(profile)) |
| 1495 return true; | 1495 return true; |
| 1496 } | |
| 1497 #endif | 1496 #endif |
| 1498 return profile->IsGuestSession() || profile->IsSystemProfile(); | 1497 return profile->IsGuestSession() || profile->IsSystemProfile(); |
| 1499 } | 1498 } |
| 1500 | 1499 |
| 1501 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, | 1500 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, |
| 1502 Profile* profile, | 1501 Profile* profile, |
| 1503 Profile::CreateStatus status) { | 1502 Profile::CreateStatus status) { |
| 1504 for (size_t i = 0; i < callbacks.size(); ++i) | 1503 for (size_t i = 0; i < callbacks.size(); ++i) |
| 1505 callbacks[i].Run(profile, status); | 1504 callbacks[i].Run(profile, status); |
| 1506 } | 1505 } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1629 | 1628 |
| 1630 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1629 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1631 if (!original_callback.is_null()) | 1630 if (!original_callback.is_null()) |
| 1632 original_callback.Run(loaded_profile, status); | 1631 original_callback.Run(loaded_profile, status); |
| 1633 } | 1632 } |
| 1634 #endif // !defined(OS_ANDROID) | 1633 #endif // !defined(OS_ANDROID) |
| 1635 | 1634 |
| 1636 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1635 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1637 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1636 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1638 } | 1637 } |
| OLD | NEW |