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

Unified Diff: chrome/browser/sync/engine/store_timestamps_command.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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/engine/store_timestamps_command.h ('k') | chrome/browser/sync/engine/sync_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/store_timestamps_command.cc
diff --git a/chrome/browser/sync/engine/store_timestamps_command.cc b/chrome/browser/sync/engine/store_timestamps_command.cc
deleted file mode 100644
index efe7bbc5fd747cf91e3458e60d0610ea4b8e900c..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/engine/store_timestamps_command.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/sync/engine/store_timestamps_command.h"
-
-#include "chrome/browser/sync/sessions/status_controller.h"
-#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/syncable/syncable.h"
-
-namespace browser_sync {
-
-StoreTimestampsCommand::StoreTimestampsCommand() {}
-StoreTimestampsCommand::~StoreTimestampsCommand() {}
-
-SyncerError StoreTimestampsCommand::ExecuteImpl(
- sessions::SyncSession* session) {
- syncable::Directory* dir = session->context()->directory();
-
- const GetUpdatesResponse& updates =
- session->status_controller().updates_response().get_updates();
-
- sessions::StatusController* status = session->mutable_status_controller();
-
- // Update the progress marker tokens from the server result. If a marker
- // was omitted for any one type, that indicates no change from the previous
- // state.
- syncable::ModelTypeSet forward_progress_types;
- for (int i = 0; i < updates.new_progress_marker_size(); ++i) {
- syncable::ModelType model =
- syncable::GetModelTypeFromSpecificsFieldNumber(
- updates.new_progress_marker(i).data_type_id());
- if (model == syncable::UNSPECIFIED || model == syncable::TOP_LEVEL_FOLDER) {
- NOTREACHED() << "Unintelligible server response.";
- continue;
- }
- forward_progress_types.Put(model);
- dir->SetDownloadProgress(model, updates.new_progress_marker(i));
- }
- DCHECK(!forward_progress_types.Empty() ||
- updates.changes_remaining() == 0);
- if (VLOG_IS_ON(1)) {
- DVLOG_IF(1, !forward_progress_types.Empty())
- << "Get Updates got new progress marker for types: "
- << syncable::ModelTypeSetToString(forward_progress_types)
- << " out of possible: "
- << syncable::ModelTypeSetToString(status->updates_request_types());
- }
- if (updates.has_changes_remaining()) {
- int64 changes_left = updates.changes_remaining();
- DVLOG(1) << "Changes remaining: " << changes_left;
- status->set_num_server_changes_remaining(changes_left);
- }
-
- return SYNCER_OK;
-}
-
-} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/engine/store_timestamps_command.h ('k') | chrome/browser/sync/engine/sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698