OLD | NEW |
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/verify_updates_command.h" | 5 #include "chrome/browser/sync/engine/verify_updates_command.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "chrome/browser/sync/engine/syncer.h" | 10 #include "chrome/browser/sync/engine/syncer.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 using syncable::ScopedDirLookup; | 21 using syncable::ScopedDirLookup; |
22 using syncable::WriteTransaction; | 22 using syncable::WriteTransaction; |
23 | 23 |
24 using syncable::GET_BY_ID; | 24 using syncable::GET_BY_ID; |
25 using syncable::SYNCER; | 25 using syncable::SYNCER; |
26 | 26 |
27 VerifyUpdatesCommand::VerifyUpdatesCommand() {} | 27 VerifyUpdatesCommand::VerifyUpdatesCommand() {} |
28 VerifyUpdatesCommand::~VerifyUpdatesCommand() {} | 28 VerifyUpdatesCommand::~VerifyUpdatesCommand() {} |
29 | 29 |
30 bool VerifyUpdatesCommand::HasCustomGroupsToChange() const { | 30 bool VerifyUpdatesCommand::HasCustomGroupsToChange() const { |
31 return true; | 31 // TODO(akalin): Set to true. |
| 32 return false; |
32 } | 33 } |
33 | 34 |
34 std::set<ModelSafeGroup> VerifyUpdatesCommand::GetGroupsToChange( | 35 std::set<ModelSafeGroup> VerifyUpdatesCommand::GetGroupsToChange( |
35 const sessions::SyncSession& session) const { | 36 const sessions::SyncSession& session) const { |
36 std::set<ModelSafeGroup> groups_with_updates; | 37 std::set<ModelSafeGroup> groups_with_updates; |
37 | 38 |
38 const GetUpdatesResponse& updates = | 39 const GetUpdatesResponse& updates = |
39 session.status_controller().updates_response().get_updates(); | 40 session.status_controller().updates_response().get_updates(); |
40 for (int i = 0; i < updates.entries().size(); i++) { | 41 for (int i = 0; i < updates.entries().size(); i++) { |
41 groups_with_updates.insert( | 42 groups_with_updates.insert( |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 deleted, is_directory, model_type); | 140 deleted, is_directory, model_type); |
140 } | 141 } |
141 | 142 |
142 if (VERIFY_UNDECIDED == result.value) | 143 if (VERIFY_UNDECIDED == result.value) |
143 result.value = VERIFY_SUCCESS; // No news is good news. | 144 result.value = VERIFY_SUCCESS; // No news is good news. |
144 | 145 |
145 return result; // This might be VERIFY_SUCCESS as well | 146 return result; // This might be VERIFY_SUCCESS as well |
146 } | 147 } |
147 | 148 |
148 } // namespace browser_sync | 149 } // namespace browser_sync |
OLD | NEW |