| 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 UMA_HISTOGRAM_TIMES("Sync.Shutdown.BackendDestroyedTime", shutdown_time); | 809 UMA_HISTOGRAM_TIMES("Sync.Shutdown.BackendDestroyedTime", shutdown_time); |
| 810 | 810 |
| 811 weak_factory_.InvalidateWeakPtrs(); | 811 weak_factory_.InvalidateWeakPtrs(); |
| 812 | 812 |
| 813 // Clear various flags. | 813 // Clear various flags. |
| 814 start_up_time_ = base::Time(); | 814 start_up_time_ = base::Time(); |
| 815 expect_sync_configuration_aborted_ = false; | 815 expect_sync_configuration_aborted_ = false; |
| 816 is_auth_in_progress_ = false; | 816 is_auth_in_progress_ = false; |
| 817 backend_initialized_ = false; | 817 backend_initialized_ = false; |
| 818 cached_passphrase_.clear(); | 818 cached_passphrase_.clear(); |
| 819 access_token_.clear(); |
| 819 encryption_pending_ = false; | 820 encryption_pending_ = false; |
| 820 encrypt_everything_ = false; | 821 encrypt_everything_ = false; |
| 821 encrypted_types_ = syncer::SyncEncryptionHandler::SensitiveTypes(); | 822 encrypted_types_ = syncer::SyncEncryptionHandler::SensitiveTypes(); |
| 822 passphrase_required_reason_ = syncer::REASON_PASSPHRASE_NOT_REQUIRED; | 823 passphrase_required_reason_ = syncer::REASON_PASSPHRASE_NOT_REQUIRED; |
| 823 request_access_token_retry_timer_.Stop(); | 824 request_access_token_retry_timer_.Stop(); |
| 824 // Revert to "no auth error". | 825 // Revert to "no auth error". |
| 825 if (last_auth_error_.state() != GoogleServiceAuthError::NONE) | 826 if (last_auth_error_.state() != GoogleServiceAuthError::NONE) |
| 826 UpdateAuthErrorState(GoogleServiceAuthError::AuthErrorNone()); | 827 UpdateAuthErrorState(GoogleServiceAuthError::AuthErrorNone()); |
| 827 | 828 |
| 828 if (sync_global_error_) { | 829 if (sync_global_error_) { |
| (...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2165 NOTREACHED(); | 2166 NOTREACHED(); |
| 2166 #endif | 2167 #endif |
| 2167 } | 2168 } |
| 2168 | 2169 |
| 2169 return signin_->GetAuthenticatedUsername(); | 2170 return signin_->GetAuthenticatedUsername(); |
| 2170 } | 2171 } |
| 2171 | 2172 |
| 2172 WeakHandle<syncer::JsEventHandler> ProfileSyncService::GetJsEventHandler() { | 2173 WeakHandle<syncer::JsEventHandler> ProfileSyncService::GetJsEventHandler() { |
| 2173 return MakeWeakHandle(sync_js_controller_.AsWeakPtr()); | 2174 return MakeWeakHandle(sync_js_controller_.AsWeakPtr()); |
| 2174 } | 2175 } |
| OLD | NEW |