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.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 #if defined(OS_CHROMEOS) | 123 #if defined(OS_CHROMEOS) |
124 static bool is_guest_session = | 124 static bool is_guest_session = |
125 CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); | 125 CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); |
126 return is_guest_session; | 126 return is_guest_session; |
127 #else | 127 #else |
128 return false; | 128 return false; |
129 #endif | 129 #endif |
130 } | 130 } |
131 | 131 |
132 bool Profile::IsSyncAccessible() { | 132 bool Profile::IsSyncAccessible() { |
133 if (GetPrefs()->GetBoolean(prefs::kManagedUserNoSignin)) | |
134 return false; | |
Andrew T Wilson (Slow)
2013/01/30 10:30:33
I have a CL in flight that changes how this works
| |
135 | |
133 browser_sync::SyncPrefs prefs(GetPrefs()); | 136 browser_sync::SyncPrefs prefs(GetPrefs()); |
134 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); | 137 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); |
135 } | 138 } |
136 | 139 |
137 void Profile::MaybeSendDestroyedNotification() { | 140 void Profile::MaybeSendDestroyedNotification() { |
138 if (!sent_destroyed_notification_) { | 141 if (!sent_destroyed_notification_) { |
139 sent_destroyed_notification_ = true; | 142 sent_destroyed_notification_ = true; |
140 content::NotificationService::current()->Notify( | 143 content::NotificationService::current()->Notify( |
141 chrome::NOTIFICATION_PROFILE_DESTROYED, | 144 chrome::NOTIFICATION_PROFILE_DESTROYED, |
142 content::Source<Profile>(this), | 145 content::Source<Profile>(this), |
143 content::NotificationService::NoDetails()); | 146 content::NotificationService::NoDetails()); |
144 } | 147 } |
145 } | 148 } |
OLD | NEW |