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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 std::string state; | 928 std::string state; |
929 if (lookup.good()) { | 929 if (lookup.good()) { |
930 unique_id = lookup->cache_guid(); | 930 unique_id = lookup->cache_guid(); |
931 state = lookup->GetNotificationState(); | 931 state = lookup->GetNotificationState(); |
932 VLOG(1) << "Read notification unique ID: " << unique_id; | 932 VLOG(1) << "Read notification unique ID: " << unique_id; |
933 if (VLOG_IS_ON(1)) { | 933 if (VLOG_IS_ON(1)) { |
934 std::string encoded_state; | 934 std::string encoded_state; |
935 base::Base64Encode(state, &encoded_state); | 935 base::Base64Encode(state, &encoded_state); |
936 VLOG(1) << "Read notification state: " << encoded_state; | 936 VLOG(1) << "Read notification state: " << encoded_state; |
937 } | 937 } |
| 938 allstatus_.SetUniqueId(unique_id); |
938 } else { | 939 } else { |
939 LOG(ERROR) << "Could not read notification unique ID/state"; | 940 LOG(ERROR) << "Could not read notification unique ID/state"; |
940 } | 941 } |
941 sync_notifier_->SetUniqueId(unique_id); | 942 sync_notifier_->SetUniqueId(unique_id); |
942 sync_notifier_->SetState(state); | 943 sync_notifier_->SetState(state); |
943 | 944 |
944 UpdateCredentials(credentials); | 945 UpdateCredentials(credentials); |
945 UpdateEnabledTypes(); | 946 UpdateEnabledTypes(); |
946 return true; | 947 return true; |
947 } | 948 } |
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2108 lookup->GetDownloadProgress(*i, &marker); | 2109 lookup->GetDownloadProgress(*i, &marker); |
2109 | 2110 |
2110 if (marker.token().empty()) | 2111 if (marker.token().empty()) |
2111 result.insert(*i); | 2112 result.insert(*i); |
2112 | 2113 |
2113 } | 2114 } |
2114 return result; | 2115 return result; |
2115 } | 2116 } |
2116 | 2117 |
2117 } // namespace sync_api | 2118 } // namespace sync_api |
OLD | NEW |