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

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: 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 (switches::IsNewProfileManagement())
noms (inactive) 2014/09/12 19:33:25 This will get triggered on more platforms than des
Mike Lerman 2014/09/15 14:08:55 Excellent point. added OS ifdefs.
799 profiles::UpdateIsProfileLockEnabledIfNeeded(profile);
797 } 800 }
798 801
799 void ProfileManager::RegisterTestingProfile(Profile* profile, 802 void ProfileManager::RegisterTestingProfile(Profile* profile,
800 bool add_to_cache, 803 bool add_to_cache,
801 bool start_deferred_task_runners) { 804 bool start_deferred_task_runners) {
802 RegisterProfile(profile, true); 805 RegisterProfile(profile, true);
803 if (add_to_cache) { 806 if (add_to_cache) {
804 InitProfileUserPrefs(profile); 807 InitProfileUserPrefs(profile);
805 AddProfileToCache(profile); 808 AddProfileToCache(profile);
806 } 809 }
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); 1321 last_non_supervised_profile_path.BaseName().MaybeAsASCII());
1319 FinishDeletingProfile(profile_to_delete_path); 1322 FinishDeletingProfile(profile_to_delete_path);
1320 } 1323 }
1321 } 1324 }
1322 } 1325 }
1323 #endif 1326 #endif
1324 1327
1325 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1328 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1326 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1329 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1327 } 1330 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698