| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 set_backend_encrypted_types_ = false; | 472 set_backend_encrypted_types_ = false; |
| 473 passphrase_required_reason_ = sync_api::REASON_PASSPHRASE_NOT_REQUIRED; | 473 passphrase_required_reason_ = sync_api::REASON_PASSPHRASE_NOT_REQUIRED; |
| 474 last_attempted_user_email_.clear(); | 474 last_attempted_user_email_.clear(); |
| 475 last_auth_error_ = GoogleServiceAuthError::None(); | 475 last_auth_error_ = GoogleServiceAuthError::None(); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void ProfileSyncService::ClearServerData() { | 478 void ProfileSyncService::ClearServerData() { |
| 479 clear_server_data_state_ = CLEAR_CLEARING; | 479 clear_server_data_state_ = CLEAR_CLEARING; |
| 480 clear_server_data_timer_.Start( | 480 clear_server_data_timer_.Start( |
| 481 base::TimeDelta::FromSeconds(kSyncClearDataTimeoutInSeconds), this, | 481 base::TimeDelta::FromSeconds(kSyncClearDataTimeoutInSeconds), this, |
| 482 &ProfileSyncService::OnClearServerDataTimeout); | 482 &ProfileSyncService::OnClearServerDataTimeout, FROM_HERE); |
| 483 backend_->RequestClearServerData(); | 483 backend_->RequestClearServerData(); |
| 484 } | 484 } |
| 485 | 485 |
| 486 void ProfileSyncService::DisableForUser() { | 486 void ProfileSyncService::DisableForUser() { |
| 487 // Clear prefs (including SyncSetupHasCompleted) before shutting down so | 487 // Clear prefs (including SyncSetupHasCompleted) before shutting down so |
| 488 // PSS clients don't think we're set up while we're shutting down. | 488 // PSS clients don't think we're set up while we're shutting down. |
| 489 ClearPreferences(); | 489 ClearPreferences(); |
| 490 Shutdown(true); | 490 Shutdown(true); |
| 491 | 491 |
| 492 signin_->SignOut(); | 492 signin_->SignOut(); |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); | 1574 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); |
| 1575 syncable::ModelTypeSet registered; | 1575 syncable::ModelTypeSet registered; |
| 1576 GetRegisteredDataTypes(®istered); | 1576 GetRegisteredDataTypes(®istered); |
| 1577 syncable::ModelTypeBitSet registered_bit_set = | 1577 syncable::ModelTypeBitSet registered_bit_set = |
| 1578 syncable::ModelTypeBitSetFromSet(registered); | 1578 syncable::ModelTypeBitSetFromSet(registered); |
| 1579 unacknowledged = registered_bit_set & ~acknowledged; | 1579 unacknowledged = registered_bit_set & ~acknowledged; |
| 1580 } | 1580 } |
| 1581 return unacknowledged; | 1581 return unacknowledged; |
| 1582 } | 1582 } |
| 1583 | 1583 |
| OLD | NEW |