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 // TODO(akalin): Set to true. | 31 return true; |
32 return false; | |
33 } | 32 } |
34 | 33 |
35 std::set<ModelSafeGroup> VerifyUpdatesCommand::GetGroupsToChange( | 34 std::set<ModelSafeGroup> VerifyUpdatesCommand::GetGroupsToChange( |
36 const sessions::SyncSession& session) const { | 35 const sessions::SyncSession& session) const { |
37 std::set<ModelSafeGroup> groups_with_updates; | 36 std::set<ModelSafeGroup> groups_with_updates; |
38 | 37 |
39 const GetUpdatesResponse& updates = | 38 const GetUpdatesResponse& updates = |
40 session.status_controller().updates_response().get_updates(); | 39 session.status_controller().updates_response().get_updates(); |
41 for (int i = 0; i < updates.entries().size(); i++) { | 40 for (int i = 0; i < updates.entries().size(); i++) { |
42 groups_with_updates.insert( | 41 groups_with_updates.insert( |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 deleted, is_directory, model_type); | 139 deleted, is_directory, model_type); |
141 } | 140 } |
142 | 141 |
143 if (VERIFY_UNDECIDED == result.value) | 142 if (VERIFY_UNDECIDED == result.value) |
144 result.value = VERIFY_SUCCESS; // No news is good news. | 143 result.value = VERIFY_SUCCESS; // No news is good news. |
145 | 144 |
146 return result; // This might be VERIFY_SUCCESS as well | 145 return result; // This might be VERIFY_SUCCESS as well |
147 } | 146 } |
148 | 147 |
149 } // namespace browser_sync | 148 } // namespace browser_sync |
OLD | NEW |