| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <cstddef> | 5 #include <cstddef> |
| 6 #include <cstdio> | 6 #include <cstdio> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 size_t i = 1; | 137 size_t i = 1; |
| 138 size_t change_count = changes.Get().size(); | 138 size_t change_count = changes.Get().size(); |
| 139 for (ChangeRecordList::const_iterator it = | 139 for (ChangeRecordList::const_iterator it = |
| 140 changes.Get().begin(); it != changes.Get().end(); ++it) { | 140 changes.Get().begin(); it != changes.Get().end(); ++it) { |
| 141 scoped_ptr<base::DictionaryValue> change_value(it->ToValue()); | 141 scoped_ptr<base::DictionaryValue> change_value(it->ToValue()); |
| 142 LOG(INFO) << "Change (" << i << "/" << change_count << "): " | 142 LOG(INFO) << "Change (" << i << "/" << change_count << "): " |
| 143 << ValueToString(*change_value); | 143 << ValueToString(*change_value); |
| 144 if (it->action != ChangeRecord::ACTION_DELETE) { | 144 if (it->action != ChangeRecord::ACTION_DELETE) { |
| 145 ReadNode node(trans); | 145 ReadNode node(trans); |
| 146 CHECK_EQ(node.InitByIdLookup(it->id), BaseNode::INIT_OK); | 146 CHECK_EQ(node.InitByIdLookup(it->id), BaseNode::INIT_OK); |
| 147 scoped_ptr<base::DictionaryValue> details(node.GetDetailsAsValue()); | 147 scoped_ptr<base::DictionaryValue> details(node.ToValue()); |
| 148 VLOG(1) << "Details: " << ValueToString(*details); | 148 VLOG(1) << "Details: " << ValueToString(*details); |
| 149 } | 149 } |
| 150 ++i; | 150 ++i; |
| 151 } | 151 } |
| 152 } | 152 } |
| 153 | 153 |
| 154 virtual void OnChangesComplete(ModelType model_type) OVERRIDE { | 154 virtual void OnChangesComplete(ModelType model_type) OVERRIDE { |
| 155 LOG(INFO) << "Changes complete for " | 155 LOG(INFO) << "Changes complete for " |
| 156 << ModelTypeToString(model_type); | 156 << ModelTypeToString(model_type); |
| 157 } | 157 } |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 io_thread.Stop(); | 391 io_thread.Stop(); |
| 392 return 0; | 392 return 0; |
| 393 } | 393 } |
| 394 | 394 |
| 395 } // namespace | 395 } // namespace |
| 396 } // namespace syncer | 396 } // namespace syncer |
| 397 | 397 |
| 398 int main(int argc, char* argv[]) { | 398 int main(int argc, char* argv[]) { |
| 399 return syncer::SyncClientMain(argc, argv); | 399 return syncer::SyncClientMain(argc, argv); |
| 400 } | 400 } |
| OLD | NEW |