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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 gaia_password_.clear(); | 475 gaia_password_.clear(); |
476 pending_types_for_encryption_.clear(); | 476 pending_types_for_encryption_.clear(); |
477 set_backend_encrypted_types_ = false; | 477 set_backend_encrypted_types_ = false; |
478 passphrase_required_reason_ = sync_api::REASON_PASSPHRASE_NOT_REQUIRED; | 478 passphrase_required_reason_ = sync_api::REASON_PASSPHRASE_NOT_REQUIRED; |
479 last_attempted_user_email_.clear(); | 479 last_attempted_user_email_.clear(); |
480 last_auth_error_ = GoogleServiceAuthError::None(); | 480 last_auth_error_ = GoogleServiceAuthError::None(); |
481 } | 481 } |
482 | 482 |
483 void ProfileSyncService::ClearServerData() { | 483 void ProfileSyncService::ClearServerData() { |
484 clear_server_data_state_ = CLEAR_CLEARING; | 484 clear_server_data_state_ = CLEAR_CLEARING; |
485 clear_server_data_timer_.Start(FROM_HERE, | 485 clear_server_data_timer_.Start( |
486 base::TimeDelta::FromSeconds(kSyncClearDataTimeoutInSeconds), this, | 486 base::TimeDelta::FromSeconds(kSyncClearDataTimeoutInSeconds), this, |
487 &ProfileSyncService::OnClearServerDataTimeout); | 487 &ProfileSyncService::OnClearServerDataTimeout); |
488 backend_->RequestClearServerData(); | 488 backend_->RequestClearServerData(); |
489 } | 489 } |
490 | 490 |
491 void ProfileSyncService::DisableForUser() { | 491 void ProfileSyncService::DisableForUser() { |
492 // Clear prefs (including SyncSetupHasCompleted) before shutting down so | 492 // Clear prefs (including SyncSetupHasCompleted) before shutting down so |
493 // PSS clients don't think we're set up while we're shutting down. | 493 // PSS clients don't think we're set up while we're shutting down. |
494 ClearPreferences(); | 494 ClearPreferences(); |
495 Shutdown(true); | 495 Shutdown(true); |
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); | 1587 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); |
1588 syncable::ModelTypeSet registered; | 1588 syncable::ModelTypeSet registered; |
1589 GetRegisteredDataTypes(®istered); | 1589 GetRegisteredDataTypes(®istered); |
1590 syncable::ModelTypeBitSet registered_bit_set = | 1590 syncable::ModelTypeBitSet registered_bit_set = |
1591 syncable::ModelTypeBitSetFromSet(registered); | 1591 syncable::ModelTypeBitSetFromSet(registered); |
1592 unacknowledged = registered_bit_set & ~acknowledged; | 1592 unacknowledged = registered_bit_set & ~acknowledged; |
1593 } | 1593 } |
1594 return unacknowledged; | 1594 return unacknowledged; |
1595 } | 1595 } |
1596 | 1596 |
OLD | NEW |