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

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

Issue 10837214: Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 years, 4 months 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 service()->DisableForUser(); 979 service()->DisableForUser();
980 wait_state_ = SYNC_DISABLED; 980 wait_state_ = SYNC_DISABLED;
981 DVLOG(1) << "DisableSyncForAllDatatypes(): Disabled sync for all " 981 DVLOG(1) << "DisableSyncForAllDatatypes(): Disabled sync for all "
982 << "datatypes on " << profile_debug_name_; 982 << "datatypes on " << profile_debug_name_;
983 return true; 983 return true;
984 } 984 }
985 985
986 std::string ProfileSyncServiceHarness::GetUpdatedTimestamp( 986 std::string ProfileSyncServiceHarness::GetUpdatedTimestamp(
987 syncer::ModelType model_type) { 987 syncer::ModelType model_type) {
988 const SyncSessionSnapshot& snap = GetLastSessionSnapshot(); 988 const SyncSessionSnapshot& snap = GetLastSessionSnapshot();
989 return snap.download_progress_markers()[model_type]; 989 return snap.download_progress_markers()[model_type].payload;
990 } 990 }
991 991
992 std::string ProfileSyncServiceHarness::GetClientInfoString( 992 std::string ProfileSyncServiceHarness::GetClientInfoString(
993 const std::string& message) { 993 const std::string& message) {
994 std::stringstream os; 994 std::stringstream os;
995 os << profile_debug_name_ << ": " << message << ": "; 995 os << profile_debug_name_ << ": " << message << ": ";
996 if (service()) { 996 if (service()) {
997 const SyncSessionSnapshot& snap = GetLastSessionSnapshot(); 997 const SyncSessionSnapshot& snap = GetLastSessionSnapshot();
998 const ProfileSyncService::Status& status = GetStatus(); 998 const ProfileSyncService::Status& status = GetStatus();
999 // Capture select info from the sync session snapshot and syncer status. 999 // Capture select info from the sync session snapshot and syncer status.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1108
1109 std::string ProfileSyncServiceHarness::GetServiceStatus() { 1109 std::string ProfileSyncServiceHarness::GetServiceStatus() {
1110 scoped_ptr<DictionaryValue> value( 1110 scoped_ptr<DictionaryValue> value(
1111 sync_ui_util::ConstructAboutInformation(service_)); 1111 sync_ui_util::ConstructAboutInformation(service_));
1112 std::string service_status; 1112 std::string service_status;
1113 base::JSONWriter::WriteWithOptions(value.get(), 1113 base::JSONWriter::WriteWithOptions(value.get(),
1114 base::JSONWriter::OPTIONS_PRETTY_PRINT, 1114 base::JSONWriter::OPTIONS_PRETTY_PRINT,
1115 &service_status); 1115 &service_status);
1116 return service_status; 1116 return service_status;
1117 } 1117 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698