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/internal_api/sync_manager.h" | 5 #include "chrome/browser/sync/internal_api/sync_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 sync_notifier_->SetUniqueId(unique_id); | 942 sync_notifier_->SetUniqueId(unique_id); |
943 sync_notifier_->SetState(state); | 943 sync_notifier_->SetState(state); |
944 | 944 |
945 UpdateCredentials(credentials); | 945 UpdateCredentials(credentials); |
946 UpdateEnabledTypes(); | 946 UpdateEnabledTypes(); |
947 return true; | 947 return true; |
948 } | 948 } |
949 | 949 |
950 void SyncManager::SyncInternal::UpdateCredentials( | 950 void SyncManager::SyncInternal::UpdateCredentials( |
951 const SyncCredentials& credentials) { | 951 const SyncCredentials& credentials) { |
| 952 fprintf(stderr, "%s\n", __func__); |
952 DCHECK(thread_checker_.CalledOnValidThread()); | 953 DCHECK(thread_checker_.CalledOnValidThread()); |
953 DCHECK_EQ(credentials.email, share_.name); | 954 DCHECK_EQ(credentials.email, share_.name); |
954 DCHECK(!credentials.email.empty()); | 955 DCHECK(!credentials.email.empty()); |
955 DCHECK(!credentials.sync_token.empty()); | 956 DCHECK(!credentials.sync_token.empty()); |
956 | 957 |
957 observing_ip_address_changes_ = true; | 958 observing_ip_address_changes_ = true; |
958 if (connection_manager()->set_auth_token(credentials.sync_token)) { | 959 if (connection_manager()->set_auth_token(credentials.sync_token)) { |
959 sync_notifier_->UpdateCredentials( | 960 sync_notifier_->UpdateCredentials( |
960 credentials.email, credentials.sync_token); | 961 credentials.email, credentials.sync_token); |
961 if (!setup_for_test_mode_ && initialized_) { | 962 if (!setup_for_test_mode_ && initialized_) { |
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 lookup->GetDownloadProgress(*i, &marker); | 2110 lookup->GetDownloadProgress(*i, &marker); |
2110 | 2111 |
2111 if (marker.token().empty()) | 2112 if (marker.token().empty()) |
2112 result.insert(*i); | 2113 result.insert(*i); |
2113 | 2114 |
2114 } | 2115 } |
2115 return result; | 2116 return result; |
2116 } | 2117 } |
2117 | 2118 |
2118 } // namespace sync_api | 2119 } // namespace sync_api |
OLD | NEW |