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); | |
939 } else { | 938 } else { |
940 LOG(ERROR) << "Could not read notification unique ID/state"; | 939 LOG(ERROR) << "Could not read notification unique ID/state"; |
941 } | 940 } |
942 sync_notifier_->SetUniqueId(unique_id); | 941 sync_notifier_->SetUniqueId(unique_id); |
943 sync_notifier_->SetState(state); | 942 sync_notifier_->SetState(state); |
944 | 943 |
945 UpdateCredentials(credentials); | 944 UpdateCredentials(credentials); |
946 UpdateEnabledTypes(); | 945 UpdateEnabledTypes(); |
947 return true; | 946 return true; |
948 } | 947 } |
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 lookup->GetDownloadProgress(*i, &marker); | 2108 lookup->GetDownloadProgress(*i, &marker); |
2110 | 2109 |
2111 if (marker.token().empty()) | 2110 if (marker.token().empty()) |
2112 result.insert(*i); | 2111 result.insert(*i); |
2113 | 2112 |
2114 } | 2113 } |
2115 return result; | 2114 return result; |
2116 } | 2115 } |
2117 | 2116 |
2118 } // namespace sync_api | 2117 } // namespace sync_api |
OLD | NEW |