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

Unified Diff: chrome/browser/sync/retry_verifier.cc

Issue 10197004: [Sync] Convert SyncSessionSnapshot to a copy-able class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/retry_verifier.h ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/retry_verifier.cc
diff --git a/chrome/browser/sync/retry_verifier.cc b/chrome/browser/sync/retry_verifier.cc
index 0fa3843ba3e589d00f1200c4b291866fddb36148..b7f395bcc7e318fc1b707be12f5e6899734e8fbc 100644
--- a/chrome/browser/sync/retry_verifier.cc
+++ b/chrome/browser/sync/retry_verifier.cc
@@ -81,7 +81,7 @@ RetryVerifier::~RetryVerifier() {
void RetryVerifier::Initialize(
const browser_sync::sessions::SyncSessionSnapshot& snap) {
retry_count_ = 0;
- last_sync_time_ = snap.sync_start_time;
+ last_sync_time_ = snap.sync_start_time();
FillDelayTable(delay_table_, kMaxRetry);
done_ = false;
success_ = false;
@@ -91,9 +91,9 @@ void RetryVerifier::VerifyRetryInterval(
const browser_sync::sessions::SyncSessionSnapshot& snap) {
DCHECK(retry_count_ < kMaxRetry);
if (retry_count_ == 0) {
- if (snap.sync_start_time != last_sync_time_) {
+ if (snap.sync_start_time() != last_sync_time_) {
retry_count_++;
- last_sync_time_ = snap.sync_start_time;
+ last_sync_time_ = snap.sync_start_time();
}
success_ = true;
return;
@@ -101,10 +101,10 @@ void RetryVerifier::VerifyRetryInterval(
// Check if the sync start time has changed. If so indicates a new sync
// has taken place.
- if (snap.sync_start_time != last_sync_time_) {
- base::TimeDelta delta = snap.sync_start_time - last_sync_time_;
+ if (snap.sync_start_time() != last_sync_time_) {
+ base::TimeDelta delta = snap.sync_start_time() - last_sync_time_;
success_ = IsRetryOnTime(delay_table_,retry_count_ -1, delta);
- last_sync_time_ = snap.sync_start_time;
+ last_sync_time_ = snap.sync_start_time();
++retry_count_;
done_ = (retry_count_ >= kMaxRetry);
return;
« no previous file with comments | « chrome/browser/sync/retry_verifier.h ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698