Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: chrome/browser/sync/engine/syncapi.cc

Issue 285008: If chrome starts without a network connection, the sync serverconnectionmanag... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698