summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/profile_sync_service_harness.cc
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-24 23:32:41 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-24 23:32:41 +0000
commit420914939dd9d240be781df2492bdcd87e553973 (patch)
tree33892ace8cccde81b850019f8bf43c67b0887b80 /chrome/browser/sync/profile_sync_service_harness.cc
parent6ea03316725dfd38af1f507dba623e807b762580 (diff)
downloadchromium_src-420914939dd9d240be781df2492bdcd87e553973.zip
chromium_src-420914939dd9d240be781df2492bdcd87e553973.tar.gz
chromium_src-420914939dd9d240be781df2492bdcd87e553973.tar.bz2
[Sync] Refactored ProfileSyncService and remove its backend() function
Moved bodies of test functions into .cc files. Remove sync_service() accessors from various model associators. Renamed GetUserShareHandle to GetUserShare() and removed typedefs for its return types. Added plenty of TODOs for future improvements. BUG=None TEST=unit_tests Review URL: http://codereview.chromium.org/6375007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/profile_sync_service_harness.cc')
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index 6f2cb90..4243c4c 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -447,7 +447,7 @@ bool ProfileSyncServiceHarness::IsSynced() {
snap->num_conflicting_updates == 0 && // We can decrypt everything.
ServiceIsPushingChanges() &&
GetStatus().notifications_enabled &&
- !service()->backend()->HasUnsyncedItems() &&
+ !service()->HasUnsyncedItems() &&
!snap->has_more_to_sync &&
snap->unsynced_count == 0);
}
@@ -480,8 +480,8 @@ bool ProfileSyncServiceHarness::MatchesOtherClient(
const SyncSessionSnapshot*
ProfileSyncServiceHarness::GetLastSessionSnapshot() const {
DCHECK(service_ != NULL) << "Sync service has not yet been set up.";
- if (service_->backend()) {
- return service_->backend()->GetLastSessionSnapshot();
+ if (service_->sync_initialized()) {
+ return service_->GetLastSessionSnapshot();
}
return NULL;
}
@@ -582,7 +582,7 @@ void ProfileSyncServiceHarness::LogClientInfo(std::string message) {
<< ", unsynced_count: " << snap->unsynced_count
<< ", num_conflicting_updates: " << snap->num_conflicting_updates
<< ", has_unsynced_items: "
- << service()->backend()->HasUnsyncedItems()
+ << service()->HasUnsyncedItems()
<< ", observed_passphrase_required: "
<< service()->observed_passphrase_required()
<< ", notifications_enabled: "