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 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 expect_sync_configuration_aborted_ = true; | 1284 expect_sync_configuration_aborted_ = true; |
1285 } | 1285 } |
1286 // Trigger an unrecoverable error to stop syncing. | 1286 // Trigger an unrecoverable error to stop syncing. |
1287 OnInternalUnrecoverableError(FROM_HERE, | 1287 OnInternalUnrecoverableError(FROM_HERE, |
1288 last_actionable_error_.error_description, | 1288 last_actionable_error_.error_description, |
1289 true, | 1289 true, |
1290 ERROR_REASON_ACTIONABLE_ERROR); | 1290 ERROR_REASON_ACTIONABLE_ERROR); |
1291 break; | 1291 break; |
1292 case syncer::DISABLE_SYNC_ON_CLIENT: | 1292 case syncer::DISABLE_SYNC_ON_CLIENT: |
1293 OnStopSyncingPermanently(); | 1293 OnStopSyncingPermanently(); |
1294 // TODO(rsimha): Re-evaluate whether to also sign out the user here after | 1294 #if !defined(OS_CHROMEOS) |
1295 // a dashboard clear. See http://crbug.com/240436. | 1295 // On desktop Chrome, sign out the user after a dashboard clear. |
| 1296 // TODO(rsimha): Revisit this for M30. See http://crbug.com/252049. |
| 1297 if (!auto_start_enabled_) // Skip sign out on ChromeOS/Android. |
| 1298 SigninManagerFactory::GetForProfile(profile_)->SignOut(); |
| 1299 #endif |
1296 break; | 1300 break; |
1297 case syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT: | 1301 case syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT: |
1298 // Sync disabled by domain admin. we should stop syncing until next | 1302 // Sync disabled by domain admin. we should stop syncing until next |
1299 // restart. | 1303 // restart. |
1300 sync_disabled_by_admin_ = true; | 1304 sync_disabled_by_admin_ = true; |
1301 ShutdownImpl(true); | 1305 ShutdownImpl(true); |
1302 break; | 1306 break; |
1303 default: | 1307 default: |
1304 NOTREACHED(); | 1308 NOTREACHED(); |
1305 } | 1309 } |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 std::string ProfileSyncService::GetEffectiveUsername() { | 2199 std::string ProfileSyncService::GetEffectiveUsername() { |
2196 #if defined(ENABLE_MANAGED_USERS) | 2200 #if defined(ENABLE_MANAGED_USERS) |
2197 if (ManagedUserService::ProfileIsManaged(profile_)) { | 2201 if (ManagedUserService::ProfileIsManaged(profile_)) { |
2198 DCHECK_EQ(std::string(), signin_->GetAuthenticatedUsername()); | 2202 DCHECK_EQ(std::string(), signin_->GetAuthenticatedUsername()); |
2199 return ManagedUserService::GetManagedUserPseudoEmail(); | 2203 return ManagedUserService::GetManagedUserPseudoEmail(); |
2200 } | 2204 } |
2201 #endif | 2205 #endif |
2202 | 2206 |
2203 return signin_->GetAuthenticatedUsername(); | 2207 return signin_->GetAuthenticatedUsername(); |
2204 } | 2208 } |
OLD | NEW |