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

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

Issue 10523003: Refactor following sync commit loop change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor fixes Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/sync/sync_ui_util.cc » ('j') | sync/engine/commit.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 788
789 bool ProfileSyncServiceHarness::IsFullySynced() { 789 bool ProfileSyncServiceHarness::IsFullySynced() {
790 if (service() == NULL) { 790 if (service() == NULL) {
791 DVLOG(1) << GetClientInfoString("IsFullySynced: false"); 791 DVLOG(1) << GetClientInfoString("IsFullySynced: false");
792 return false; 792 return false;
793 } 793 }
794 const SyncSessionSnapshot& snap = GetLastSessionSnapshot(); 794 const SyncSessionSnapshot& snap = GetLastSessionSnapshot();
795 // If we didn't try to commit anything in the previous cycle, there's a 795 // If we didn't try to commit anything in the previous cycle, there's a
796 // good chance that we're now fully up to date. 796 // good chance that we're now fully up to date.
797 bool is_fully_synced = 797 bool is_fully_synced =
798 (snap.errors().last_post_commit_result == browser_sync::UNSET) 798 (snap.errors().commit_result == browser_sync::UNSET)
799 && IsDataSyncedImpl(snap); 799 && IsDataSyncedImpl(snap);
800 800
801 DVLOG(1) << GetClientInfoString( 801 DVLOG(1) << GetClientInfoString(
802 is_fully_synced ? "IsFullySynced: true" : "IsFullySynced: false"); 802 is_fully_synced ? "IsFullySynced: true" : "IsFullySynced: false");
803 return is_fully_synced; 803 return is_fully_synced;
804 } 804 }
805 805
806 bool ProfileSyncServiceHarness::HasPendingBackendMigration() { 806 bool ProfileSyncServiceHarness::HasPendingBackendMigration() {
807 browser_sync::BackendMigrator* migrator = 807 browser_sync::BackendMigrator* migrator =
808 service()->GetBackendMigratorForTest(); 808 service()->GetBackendMigratorForTest();
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 1104
1105 std::string ProfileSyncServiceHarness::GetServiceStatus() { 1105 std::string ProfileSyncServiceHarness::GetServiceStatus() {
1106 DictionaryValue value; 1106 DictionaryValue value;
1107 sync_ui_util::ConstructAboutInformation(service_, &value); 1107 sync_ui_util::ConstructAboutInformation(service_, &value);
1108 std::string service_status; 1108 std::string service_status;
1109 base::JSONWriter::WriteWithOptions(&value, 1109 base::JSONWriter::WriteWithOptions(&value,
1110 base::JSONWriter::OPTIONS_PRETTY_PRINT, 1110 base::JSONWriter::OPTIONS_PRETTY_PRINT,
1111 &service_status); 1111 &service_status);
1112 return service_status; 1112 return service_status;
1113 } 1113 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/sync_ui_util.cc » ('j') | sync/engine/commit.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698