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

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

Issue 566933005: Do not display lock for hosted domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit tests Created 6 years, 3 months 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
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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 command_line->HasSwitch(switches::kSupervisedUserId); 787 command_line->HasSwitch(switches::kSupervisedUserId);
788 if (force_supervised_user_id) { 788 if (force_supervised_user_id) {
789 supervised_user_id = 789 supervised_user_id =
790 command_line->GetSwitchValueASCII(switches::kSupervisedUserId); 790 command_line->GetSwitchValueASCII(switches::kSupervisedUserId);
791 } 791 }
792 if (force_supervised_user_id || 792 if (force_supervised_user_id ||
793 !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) { 793 !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) {
794 profile->GetPrefs()->SetString(prefs::kSupervisedUserId, 794 profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
795 supervised_user_id); 795 supervised_user_id);
796 } 796 }
797
798 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
799 if (switches::IsNewProfileManagement())
800 profiles::UpdateIsProfileLockEnabledIfNeeded(profile);
noms (inactive) 2014/09/15 18:52:40 Hmm, this worries me a little because it looks lik
Mike Lerman 2014/09/15 19:51:41 Only happens if the algorithm version changes. Com
801 #endif
797 } 802 }
798 803
799 void ProfileManager::RegisterTestingProfile(Profile* profile, 804 void ProfileManager::RegisterTestingProfile(Profile* profile,
800 bool add_to_cache, 805 bool add_to_cache,
801 bool start_deferred_task_runners) { 806 bool start_deferred_task_runners) {
802 RegisterProfile(profile, true); 807 RegisterProfile(profile, true);
803 if (add_to_cache) { 808 if (add_to_cache) {
804 InitProfileUserPrefs(profile); 809 InitProfileUserPrefs(profile);
805 AddProfileToCache(profile); 810 AddProfileToCache(profile);
806 } 811 }
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); 1323 last_non_supervised_profile_path.BaseName().MaybeAsASCII());
1319 FinishDeletingProfile(profile_to_delete_path); 1324 FinishDeletingProfile(profile_to_delete_path);
1320 } 1325 }
1321 } 1326 }
1322 } 1327 }
1323 #endif 1328 #endif
1324 1329
1325 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1330 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1326 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1331 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1327 } 1332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698