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

Side by Side Diff: trunk/src/chrome/browser/sync/profile_sync_service_harness.cc

Issue 101113004: Revert 239759 "The comment in base64.h implies that base::Base64..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
OLDNEW
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
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 base::Base64Encode(marker, &marker_base64); 932 if (!base::Base64Encode(marker, &marker_base64)) {
933 base::Base64Encode(partner_marker, &partner_marker_base64); 933 NOTREACHED();
934 }
935 if (!base::Base64Encode(
936 partner_marker, &partner_marker_base64)) {
937 NOTREACHED();
938 }
934 DVLOG(2) << syncer::ModelTypeToString(i.Get()) << ": " 939 DVLOG(2) << syncer::ModelTypeToString(i.Get()) << ": "
935 << profile_debug_name_ << " progress marker = " 940 << profile_debug_name_ << " progress marker = "
936 << marker_base64 << ", " 941 << marker_base64 << ", "
937 << partner->profile_debug_name_ 942 << partner->profile_debug_name_
938 << " partner progress marker = " 943 << " partner progress marker = "
939 << partner_marker_base64; 944 << partner_marker_base64;
940 } 945 }
941 return false; 946 return false;
942 } 947 }
943 } 948 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 1190
1186 std::string ProfileSyncServiceHarness::GetServiceStatus() { 1191 std::string ProfileSyncServiceHarness::GetServiceStatus() {
1187 scoped_ptr<DictionaryValue> value( 1192 scoped_ptr<DictionaryValue> value(
1188 sync_ui_util::ConstructAboutInformation(service_)); 1193 sync_ui_util::ConstructAboutInformation(service_));
1189 std::string service_status; 1194 std::string service_status;
1190 base::JSONWriter::WriteWithOptions(value.get(), 1195 base::JSONWriter::WriteWithOptions(value.get(),
1191 base::JSONWriter::OPTIONS_PRETTY_PRINT, 1196 base::JSONWriter::OPTIONS_PRETTY_PRINT,
1192 &service_status); 1197 &service_status);
1193 return service_status; 1198 return service_status;
1194 } 1199 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698