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

Side by Side Diff: chrome/browser/sync/engine/syncer.h

Issue 7477004: Simulate transient error and verify exponential backoff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. Created 9 years, 4 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
OLDNEW
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 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Called by other threads to tell the syncer to stop what it's doing 80 // Called by other threads to tell the syncer to stop what it's doing
81 // and return early from SyncShare, if possible. 81 // and return early from SyncShare, if possible.
82 bool ExitRequested(); 82 bool ExitRequested();
83 void RequestEarlyExit(); 83 void RequestEarlyExit();
84 84
85 // Runs a sync cycle from |first_step| to |last_step|. 85 // Runs a sync cycle from |first_step| to |last_step|.
86 virtual void SyncShare(sessions::SyncSession* session, 86 virtual void SyncShare(sessions::SyncSession* session,
87 SyncerStep first_step, 87 SyncerStep first_step,
88 SyncerStep last_step); 88 SyncerStep last_step);
89 89
90 class ScopedSyncStartStopTracker {
91 public:
92 explicit ScopedSyncStartStopTracker(sessions::SyncSession* session);
93 ~ScopedSyncStartStopTracker();
94 private:
95 sessions::SyncSession* session_;
96
97 DISALLOW_COPY_AND_ASSIGN(ScopedSyncStartStopTracker);
98 };
99
90 private: 100 private:
91 // Implements the PROCESS_CLIENT_COMMAND syncer step. 101 // Implements the PROCESS_CLIENT_COMMAND syncer step.
92 void ProcessClientCommand(sessions::SyncSession* session); 102 void ProcessClientCommand(sessions::SyncSession* session);
93 103
94 bool early_exit_requested_; 104 bool early_exit_requested_;
95 base::Lock early_exit_requested_lock_; 105 base::Lock early_exit_requested_lock_;
96 106
97 ConflictResolver resolver_; 107 ConflictResolver resolver_;
98 108
99 // A callback hook used in unittests to simulate changes between conflict set 109 // A callback hook used in unittests to simulate changes between conflict set
(...skipping 28 matching lines...) Expand all
128 }; 138 };
129 139
130 // Utility function declarations. 140 // Utility function declarations.
131 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); 141 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest);
132 void ClearServerData(syncable::MutableEntry* entry); 142 void ClearServerData(syncable::MutableEntry* entry);
133 143
134 } // namespace browser_sync 144 } // namespace browser_sync
135 145
136 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ 146 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_
137 147
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/process_updates_command.cc ('k') | chrome/browser/sync/engine/syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698