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

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: Handle a null in 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)
msw 2014/09/19 21:47:40 This will include Chrome OS, which defines both OS
Mike Lerman 2014/09/21 00:19:35 That is not the intent - I want to target Linux De
Mike Lerman 2014/09/22 13:18:56 I'll flip the OS defs around so I check iOS, Andro
msw 2014/09/22 19:58:09 Acknowledged.
799 // If the lock enabled algorithm changed, update this profile's lock status.
800 if (switches::IsNewProfileManagement())
801 profiles::UpdateIsProfileLockEnabledIfNeeded(profile);
802 #endif
797 } 803 }
798 804
799 void ProfileManager::RegisterTestingProfile(Profile* profile, 805 void ProfileManager::RegisterTestingProfile(Profile* profile,
800 bool add_to_cache, 806 bool add_to_cache,
801 bool start_deferred_task_runners) { 807 bool start_deferred_task_runners) {
802 RegisterProfile(profile, true); 808 RegisterProfile(profile, true);
803 if (add_to_cache) { 809 if (add_to_cache) {
804 InitProfileUserPrefs(profile); 810 InitProfileUserPrefs(profile);
805 AddProfileToCache(profile); 811 AddProfileToCache(profile);
806 } 812 }
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); 1324 last_non_supervised_profile_path.BaseName().MaybeAsASCII());
1319 FinishDeletingProfile(profile_to_delete_path); 1325 FinishDeletingProfile(profile_to_delete_path);
1320 } 1326 }
1321 } 1327 }
1322 } 1328 }
1323 #endif 1329 #endif
1324 1330
1325 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1331 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1326 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1332 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1327 } 1333 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698