OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/profile_sync_service_harness.h" | 5 #include "chrome/browser/sync/profile_sync_service_harness.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <ostream> | 9 #include <ostream> |
10 #include <set> | 10 #include <set> |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 } | 922 } |
923 | 923 |
924 for (syncer::ModelTypeSet::Iterator i = common_types.First(); | 924 for (syncer::ModelTypeSet::Iterator i = common_types.First(); |
925 i.Good(); i.Inc()) { | 925 i.Good(); i.Inc()) { |
926 const std::string marker = GetSerializedProgressMarker(i.Get()); | 926 const std::string marker = GetSerializedProgressMarker(i.Get()); |
927 const std::string partner_marker = | 927 const std::string partner_marker = |
928 partner->GetSerializedProgressMarker(i.Get()); | 928 partner->GetSerializedProgressMarker(i.Get()); |
929 if (marker != partner_marker) { | 929 if (marker != partner_marker) { |
930 if (VLOG_IS_ON(2)) { | 930 if (VLOG_IS_ON(2)) { |
931 std::string marker_base64, partner_marker_base64; | 931 std::string marker_base64, partner_marker_base64; |
932 if (!base::Base64Encode(marker, &marker_base64)) { | 932 base::Base64Encode(marker, &marker_base64); |
933 NOTREACHED(); | 933 base::Base64Encode(partner_marker, &partner_marker_base64); |
934 } | |
935 if (!base::Base64Encode( | |
936 partner_marker, &partner_marker_base64)) { | |
937 NOTREACHED(); | |
938 } | |
939 DVLOG(2) << syncer::ModelTypeToString(i.Get()) << ": " | 934 DVLOG(2) << syncer::ModelTypeToString(i.Get()) << ": " |
940 << profile_debug_name_ << " progress marker = " | 935 << profile_debug_name_ << " progress marker = " |
941 << marker_base64 << ", " | 936 << marker_base64 << ", " |
942 << partner->profile_debug_name_ | 937 << partner->profile_debug_name_ |
943 << " partner progress marker = " | 938 << " partner progress marker = " |
944 << partner_marker_base64; | 939 << partner_marker_base64; |
945 } | 940 } |
946 return false; | 941 return false; |
947 } | 942 } |
948 } | 943 } |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 | 1185 |
1191 std::string ProfileSyncServiceHarness::GetServiceStatus() { | 1186 std::string ProfileSyncServiceHarness::GetServiceStatus() { |
1192 scoped_ptr<DictionaryValue> value( | 1187 scoped_ptr<DictionaryValue> value( |
1193 sync_ui_util::ConstructAboutInformation(service_)); | 1188 sync_ui_util::ConstructAboutInformation(service_)); |
1194 std::string service_status; | 1189 std::string service_status; |
1195 base::JSONWriter::WriteWithOptions(value.get(), | 1190 base::JSONWriter::WriteWithOptions(value.get(), |
1196 base::JSONWriter::OPTIONS_PRETTY_PRINT, | 1191 base::JSONWriter::OPTIONS_PRETTY_PRINT, |
1197 &service_status); | 1192 &service_status); |
1198 return service_status; | 1193 return service_status; |
1199 } | 1194 } |
OLD | NEW |