| 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/profile_sync_service_harness.h" | 5 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 "Client " << id_; | 573 "Client " << id_; |
| 574 } | 574 } |
| 575 | 575 |
| 576 std::string ProfileSyncServiceHarness::GetUpdatedTimestamp( | 576 std::string ProfileSyncServiceHarness::GetUpdatedTimestamp( |
| 577 syncable::ModelType model_type) { | 577 syncable::ModelType model_type) { |
| 578 const SyncSessionSnapshot* snap = GetLastSessionSnapshot(); | 578 const SyncSessionSnapshot* snap = GetLastSessionSnapshot(); |
| 579 DCHECK(snap != NULL) << "GetUpdatedTimestamp(): Sync snapshot is NULL."; | 579 DCHECK(snap != NULL) << "GetUpdatedTimestamp(): Sync snapshot is NULL."; |
| 580 return snap->download_progress_markers[model_type]; | 580 return snap->download_progress_markers[model_type]; |
| 581 } | 581 } |
| 582 | 582 |
| 583 void ProfileSyncServiceHarness::LogClientInfo(std::string message) { | 583 void ProfileSyncServiceHarness::LogClientInfo(const std::string& message) { |
| 584 if (service()) { | 584 if (service()) { |
| 585 const SyncSessionSnapshot* snap = GetLastSessionSnapshot(); | 585 const SyncSessionSnapshot* snap = GetLastSessionSnapshot(); |
| 586 if (snap) { | 586 if (snap) { |
| 587 VLOG(1) << "Client " << id_ << ": " << message | 587 VLOG(1) << "Client " << id_ << ": " << message |
| 588 << ": num_updates_downloaded : " | 588 << ": num_updates_downloaded : " |
| 589 << snap->syncer_status.num_updates_downloaded_total | 589 << snap->syncer_status.num_updates_downloaded_total |
| 590 << ", has_more_to_sync: " << snap->has_more_to_sync | 590 << ", has_more_to_sync: " << snap->has_more_to_sync |
| 591 << ", unsynced_count: " << snap->unsynced_count | 591 << ", unsynced_count: " << snap->unsynced_count |
| 592 << ", num_conflicting_updates: " << snap->num_conflicting_updates | 592 << ", num_conflicting_updates: " << snap->num_conflicting_updates |
| 593 << ", has_unsynced_items: " | 593 << ", has_unsynced_items: " |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 } | 632 } |
| 633 | 633 |
| 634 bool ProfileSyncServiceHarness::IsTypeEncrypted(syncable::ModelType type) { | 634 bool ProfileSyncServiceHarness::IsTypeEncrypted(syncable::ModelType type) { |
| 635 syncable::ModelTypeSet encrypted_types; | 635 syncable::ModelTypeSet encrypted_types; |
| 636 service_->GetEncryptedDataTypes(&encrypted_types); | 636 service_->GetEncryptedDataTypes(&encrypted_types); |
| 637 if (encrypted_types.count(type) == 0) { | 637 if (encrypted_types.count(type) == 0) { |
| 638 return false; | 638 return false; |
| 639 } | 639 } |
| 640 return true; | 640 return true; |
| 641 } | 641 } |
| OLD | NEW |