OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_ |
| 6 #define CHROME_BROWSER_SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_ |
| 7 |
| 8 #include "chrome/browser/sync/engine/syncer_command.h" |
| 9 #include "chrome/browser/sync/engine/syncer_types.h" |
| 10 |
| 11 namespace browser_sync { |
| 12 |
| 13 // A syncer command that extracts the changelog timestamp information from |
| 14 // a GetUpdatesResponse (fetched in DownloadUpdatesCommand) and stores |
| 15 // it in the directory. This is meant to run immediately after |
| 16 // ProcessUpdatesCommand. |
| 17 // |
| 18 // Preconditions - all updates in the SyncerSesssion have been stored in the |
| 19 // database, meaning it is safe to update the persisted |
| 20 // timestamps. |
| 21 // |
| 22 // Postconditions - The next_timestamp returned by the server will be |
| 23 // saved into the directory (where it will be used |
| 24 // the next time that DownloadUpdatesCommand runs). |
| 25 class StoreTimestampsCommand : public SyncerCommand { |
| 26 public: |
| 27 StoreTimestampsCommand(); |
| 28 virtual ~StoreTimestampsCommand(); |
| 29 |
| 30 // SyncerCommand implementation. |
| 31 virtual void ExecuteImpl(sessions::SyncSession* session); |
| 32 |
| 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(StoreTimestampsCommand); |
| 35 }; |
| 36 |
| 37 } // namespace browser_sync |
| 38 |
| 39 #endif // CHROME_BROWSER_SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_ |
OLD | NEW |