| 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/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 expect_sync_configuration_aborted_ = true; | 1314 expect_sync_configuration_aborted_ = true; |
| 1315 } | 1315 } |
| 1316 // Trigger an unrecoverable error to stop syncing. | 1316 // Trigger an unrecoverable error to stop syncing. |
| 1317 OnInternalUnrecoverableError(FROM_HERE, | 1317 OnInternalUnrecoverableError(FROM_HERE, |
| 1318 last_actionable_error_.error_description, | 1318 last_actionable_error_.error_description, |
| 1319 true, | 1319 true, |
| 1320 ERROR_REASON_ACTIONABLE_ERROR); | 1320 ERROR_REASON_ACTIONABLE_ERROR); |
| 1321 break; | 1321 break; |
| 1322 case syncer::DISABLE_SYNC_ON_CLIENT: | 1322 case syncer::DISABLE_SYNC_ON_CLIENT: |
| 1323 OnStopSyncingPermanently(); | 1323 OnStopSyncingPermanently(); |
| 1324 // TODO(rsimha): Re-evaluate whether to also sign out the user here after | 1324 #if !defined(OS_CHROMEOS) |
| 1325 // a dashboard clear. See http://crbug.com/240436. | 1325 // On desktop Chrome, sign out the user after a dashboard clear. |
| 1326 // TODO(rsimha): Revisit this for M30. See http://crbug.com/252049. |
| 1327 if (!auto_start_enabled_) // Skip sign out on ChromeOS/Android. |
| 1328 SigninManagerFactory::GetForProfile(profile_)->SignOut(); |
| 1329 #endif |
| 1326 break; | 1330 break; |
| 1327 case syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT: | 1331 case syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT: |
| 1328 // Sync disabled by domain admin. we should stop syncing until next | 1332 // Sync disabled by domain admin. we should stop syncing until next |
| 1329 // restart. | 1333 // restart. |
| 1330 sync_disabled_by_admin_ = true; | 1334 sync_disabled_by_admin_ = true; |
| 1331 ShutdownImpl(true); | 1335 ShutdownImpl(true); |
| 1332 break; | 1336 break; |
| 1333 default: | 1337 default: |
| 1334 NOTREACHED(); | 1338 NOTREACHED(); |
| 1335 } | 1339 } |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2215 std::string ProfileSyncService::GetEffectiveUsername() { | 2219 std::string ProfileSyncService::GetEffectiveUsername() { |
| 2216 #if defined(ENABLE_MANAGED_USERS) | 2220 #if defined(ENABLE_MANAGED_USERS) |
| 2217 if (ManagedUserService::ProfileIsManaged(profile_)) { | 2221 if (ManagedUserService::ProfileIsManaged(profile_)) { |
| 2218 DCHECK_EQ(std::string(), signin_->GetAuthenticatedUsername()); | 2222 DCHECK_EQ(std::string(), signin_->GetAuthenticatedUsername()); |
| 2219 return ManagedUserService::GetManagedUserPseudoEmail(); | 2223 return ManagedUserService::GetManagedUserPseudoEmail(); |
| 2220 } | 2224 } |
| 2221 #endif | 2225 #endif |
| 2222 | 2226 |
| 2223 return signin_->GetAuthenticatedUsername(); | 2227 return signin_->GetAuthenticatedUsername(); |
| 2224 } | 2228 } |
| OLD | NEW |