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

Side by Side Diff: chrome/browser/sync/engine/store_timestamps_command.cc

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 #include "chrome/browser/sync/engine/store_timestamps_command.h" 5 #include "chrome/browser/sync/engine/store_timestamps_command.h"
6 6
7 #include "chrome/browser/sync/sessions/status_controller.h" 7 #include "chrome/browser/sync/sessions/status_controller.h"
8 #include "chrome/browser/sync/sessions/sync_session.h" 8 #include "chrome/browser/sync/sessions/sync_session.h"
9 #include "chrome/browser/sync/syncable/directory_manager.h" 9 #include "chrome/browser/sync/syncable/directory_manager.h"
10 #include "chrome/browser/sync/syncable/model_type.h" 10 #include "chrome/browser/sync/syncable/model_type.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 const GetUpdatesResponse& updates = 27 const GetUpdatesResponse& updates =
28 session->status_controller().updates_response().get_updates(); 28 session->status_controller().updates_response().get_updates();
29 29
30 sessions::StatusController* status = session->mutable_status_controller(); 30 sessions::StatusController* status = session->mutable_status_controller();
31 31
32 // Update the progress marker tokens from the server result. If a marker 32 // Update the progress marker tokens from the server result. If a marker
33 // was omitted for any one type, that indicates no change from the previous 33 // was omitted for any one type, that indicates no change from the previous
34 // state. 34 // state.
35 syncable::ModelEnumSet forward_progress_types; 35 syncable::ModelTypeSet forward_progress_types;
36 for (int i = 0; i < updates.new_progress_marker_size(); ++i) { 36 for (int i = 0; i < updates.new_progress_marker_size(); ++i) {
37 syncable::ModelType model = 37 syncable::ModelType model =
38 syncable::GetModelTypeFromExtensionFieldNumber( 38 syncable::GetModelTypeFromExtensionFieldNumber(
39 updates.new_progress_marker(i).data_type_id()); 39 updates.new_progress_marker(i).data_type_id());
40 if (model == syncable::UNSPECIFIED || model == syncable::TOP_LEVEL_FOLDER) { 40 if (model == syncable::UNSPECIFIED || model == syncable::TOP_LEVEL_FOLDER) {
41 NOTREACHED() << "Unintelligible server response."; 41 NOTREACHED() << "Unintelligible server response.";
42 continue; 42 continue;
43 } 43 }
44 forward_progress_types.Put(model); 44 forward_progress_types.Put(model);
45 dir->SetDownloadProgress(model, updates.new_progress_marker(i)); 45 dir->SetDownloadProgress(model, updates.new_progress_marker(i));
46 } 46 }
47 DCHECK(!forward_progress_types.Empty() || 47 DCHECK(!forward_progress_types.Empty() ||
48 updates.changes_remaining() == 0); 48 updates.changes_remaining() == 0);
49 if (VLOG_IS_ON(1)) { 49 if (VLOG_IS_ON(1)) {
50 DVLOG_IF(1, !forward_progress_types.Empty()) 50 DVLOG_IF(1, !forward_progress_types.Empty())
51 << "Get Updates got new progress marker for types: " 51 << "Get Updates got new progress marker for types: "
52 << syncable::ModelEnumSetToString(forward_progress_types) 52 << syncable::ModelTypeSetToString(forward_progress_types)
53 << " out of possible: " 53 << " out of possible: "
54 << syncable::ModelEnumSetToString(status->updates_request_types()); 54 << syncable::ModelTypeSetToString(status->updates_request_types());
55 } 55 }
56 if (updates.has_changes_remaining()) { 56 if (updates.has_changes_remaining()) {
57 int64 changes_left = updates.changes_remaining(); 57 int64 changes_left = updates.changes_remaining();
58 DVLOG(1) << "Changes remaining: " << changes_left; 58 DVLOG(1) << "Changes remaining: " << changes_left;
59 status->set_num_server_changes_remaining(changes_left); 59 status->set_num_server_changes_remaining(changes_left);
60 } 60 }
61 } 61 }
62 62
63 } // namespace browser_sync 63 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/nigori_util_unittest.cc ('k') | chrome/browser/sync/engine/sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698