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

Side by Side Diff: chrome/browser/profiles/profile.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.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 "install", 148 "install",
149 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 149 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
150 registry->RegisterBooleanPref( 150 registry->RegisterBooleanPref(
151 prefs::kSpeechRecognitionFilterProfanities, 151 prefs::kSpeechRecognitionFilterProfanities,
152 true, 152 true,
153 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 153 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
154 registry->RegisterIntegerPref( 154 registry->RegisterIntegerPref(
155 prefs::kProfileIconVersion, 155 prefs::kProfileIconVersion,
156 0, 156 0,
157 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 157 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
158 registry->RegisterBooleanPref(
159 prefs::kProfileIsLockable,
160 false,
161 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
162 registry->RegisterIntegerPref(
163 prefs::kProfileIsLockableVersion,
164 0,
165 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
158 #if defined(OS_CHROMEOS) 166 #if defined(OS_CHROMEOS)
159 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both 167 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both
160 // local state and user's profile. For other platforms we maintain 168 // local state and user's profile. For other platforms we maintain
161 // kApplicationLocale only in local state. 169 // kApplicationLocale only in local state.
162 // In the future we may want to maintain kApplicationLocale 170 // In the future we may want to maintain kApplicationLocale
163 // in user's profile for other platforms as well. 171 // in user's profile for other platforms as well.
164 registry->RegisterStringPref( 172 registry->RegisterStringPref(
165 prefs::kApplicationLocale, 173 prefs::kApplicationLocale,
166 std::string(), 174 std::string(),
167 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); 175 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 content::NotificationService::NoDetails()); 251 content::NotificationService::NoDetails());
244 } 252 }
245 } 253 }
246 254
247 bool ProfileCompare::operator()(Profile* a, Profile* b) const { 255 bool ProfileCompare::operator()(Profile* a, Profile* b) const {
248 DCHECK(a && b); 256 DCHECK(a && b);
249 if (a->IsSameProfile(b)) 257 if (a->IsSameProfile(b))
250 return false; 258 return false;
251 return a->GetOriginalProfile() < b->GetOriginalProfile(); 259 return a->GetOriginalProfile() < b->GetOriginalProfile();
252 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698