| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/engine/syncapi.h" | 5 #include "chrome/browser/sync/engine/syncapi.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 { | 1147 { |
| 1148 syncable::ScopedDirLookup lookup(dir_manager(), username_for_share()); | 1148 syncable::ScopedDirLookup lookup(dir_manager(), username_for_share()); |
| 1149 if (!lookup.good()) { | 1149 if (!lookup.good()) { |
| 1150 DCHECK(false) << "ScopedDirLookup failed on successfully opened dir"; | 1150 DCHECK(false) << "ScopedDirLookup failed on successfully opened dir"; |
| 1151 return; | 1151 return; |
| 1152 } | 1152 } |
| 1153 if (lookup->initial_sync_ended()) | 1153 if (lookup->initial_sync_ended()) |
| 1154 MarkAndNotifyInitializationComplete(); | 1154 MarkAndNotifyInitializationComplete(); |
| 1155 } | 1155 } |
| 1156 | 1156 |
| 1157 // Load the last-known good auth token into the connection manager and send |
| 1158 // it off to the AuthWatcher for validation. The result of the validation |
| 1159 // will update the connection manager if necessary. |
| 1160 connection_manager()->set_auth_token(auth_token); |
| 1157 auth_watcher()->AuthenticateWithToken(username, auth_token); | 1161 auth_watcher()->AuthenticateWithToken(username, auth_token); |
| 1158 } | 1162 } |
| 1159 | 1163 |
| 1160 void SyncManager::SyncInternal::RaiseAuthNeededEvent() { | 1164 void SyncManager::SyncInternal::RaiseAuthNeededEvent() { |
| 1161 auth_problem_ = AUTH_PROBLEM_INVALID_GAIA_CREDENTIALS; | 1165 auth_problem_ = AUTH_PROBLEM_INVALID_GAIA_CREDENTIALS; |
| 1162 if (observer_) | 1166 if (observer_) |
| 1163 observer_->OnAuthProblem(auth_problem_); | 1167 observer_->OnAuthProblem(auth_problem_); |
| 1164 } | 1168 } |
| 1165 | 1169 |
| 1166 SyncManager::~SyncManager() { | 1170 SyncManager::~SyncManager() { |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 BaseTransaction::~BaseTransaction() { | 1567 BaseTransaction::~BaseTransaction() { |
| 1564 delete lookup_; | 1568 delete lookup_; |
| 1565 } | 1569 } |
| 1566 | 1570 |
| 1567 UserShare* SyncManager::GetUserShare() const { | 1571 UserShare* SyncManager::GetUserShare() const { |
| 1568 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; | 1572 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; |
| 1569 return data_->GetUserShare(); | 1573 return data_->GetUserShare(); |
| 1570 } | 1574 } |
| 1571 | 1575 |
| 1572 } // namespace sync_api | 1576 } // namespace sync_api |
| OLD | NEW |