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

Side by Side Diff: sync/sessions/status_controller.cc

Issue 1144443004: Revert of [Sync] Refactoring polling to be reliable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « sync/sessions/status_controller.h ('k') | sync/sessions/sync_session.cc » ('j') | no next file with comments »
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 "sync/sessions/status_controller.h" 5 #include "sync/sessions/status_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "sync/internal_api/public/base/model_type.h" 10 #include "sync/internal_api/public/base/model_type.h"
(...skipping 18 matching lines...) Expand all
29 29
30 void StatusController::increment_num_reflected_updates_downloaded_by( 30 void StatusController::increment_num_reflected_updates_downloaded_by(
31 int value) { 31 int value) {
32 model_neutral_.num_reflected_updates_downloaded_total += value; 32 model_neutral_.num_reflected_updates_downloaded_total += value;
33 } 33 }
34 34
35 void StatusController::UpdateStartTime() { 35 void StatusController::UpdateStartTime() {
36 sync_start_time_ = base::Time::Now(); 36 sync_start_time_ = base::Time::Now();
37 } 37 }
38 38
39 void StatusController::UpdatePollTime() {
40 poll_finish_time_ = base::Time::Now();
41 }
42
43 void StatusController::set_num_successful_bookmark_commits(int value) { 39 void StatusController::set_num_successful_bookmark_commits(int value) {
44 model_neutral_.num_successful_bookmark_commits = value; 40 model_neutral_.num_successful_bookmark_commits = value;
45 } 41 }
46 42
47 void StatusController::increment_num_successful_bookmark_commits() { 43 void StatusController::increment_num_successful_bookmark_commits() {
48 model_neutral_.num_successful_bookmark_commits++; 44 model_neutral_.num_successful_bookmark_commits++;
49 } 45 }
50 46
51 void StatusController::increment_num_successful_commits() { 47 void StatusController::increment_num_successful_commits() {
52 model_neutral_.num_successful_commits++; 48 model_neutral_.num_successful_commits++;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 int StatusController::TotalNumConflictingItems() const { 112 int StatusController::TotalNumConflictingItems() const {
117 int sum = 0; 113 int sum = 0;
118 sum += num_encryption_conflicts(); 114 sum += num_encryption_conflicts();
119 sum += num_hierarchy_conflicts(); 115 sum += num_hierarchy_conflicts();
120 sum += num_server_conflicts(); 116 sum += num_server_conflicts();
121 return sum; 117 return sum;
122 } 118 }
123 119
124 } // namespace sessions 120 } // namespace sessions
125 } // namespace syncer 121 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/sessions/status_controller.h ('k') | sync/sessions/sync_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698