Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/notifier/invalidation_util.h" | 5 #include "chrome/browser/sync/notifier/invalidation_util.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 namespace sync_notifier { | 9 namespace sync_notifier { |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 | 54 |
| 55 std::string InvalidationToString( | 55 std::string InvalidationToString( |
| 56 const invalidation::Invalidation& invalidation) { | 56 const invalidation::Invalidation& invalidation) { |
| 57 std::stringstream ss; | 57 std::stringstream ss; |
| 58 ss << "{ "; | 58 ss << "{ "; |
| 59 ss << "object_id: " << ObjectIdToString(invalidation.object_id()) << ", "; | 59 ss << "object_id: " << ObjectIdToString(invalidation.object_id()) << ", "; |
| 60 ss << "version: " << invalidation.version() << ", "; | 60 ss << "version: " << invalidation.version() << ", "; |
| 61 ss << "components: { "; | 61 ss << "components: { "; |
| 62 const invalidation::ComponentStampLog& component_stamp_log = | 62 const invalidation::ComponentStampLog& component_stamp_log = |
| 63 invalidation.component_stamp_log(); | 63 invalidation.component_stamp_log(); |
| 64 for (int i = 0; i < component_stamp_log.stamps_size(); ++i) { | 64 for (int i = 0; i < component_stamp_log.stamp_size(); ++i) { |
|
ghc
2010/07/09 21:59:40
It's probably not necessary to print these out at
| |
| 65 const invalidation::ComponentStamp& component_stamp = | 65 const invalidation::ComponentStamp& component_stamp = |
| 66 component_stamp_log.stamps(i); | 66 component_stamp_log.stamp(i); |
| 67 ss << "component: " << component_stamp.component() << ", "; | 67 ss << "component: " << component_stamp.component() << ", "; |
| 68 ss << "time: " << component_stamp.time() << ", "; | 68 ss << "time: " << component_stamp.time() << ", "; |
| 69 } | 69 } |
| 70 ss << " }"; | 70 ss << " }"; |
| 71 ss << " }"; | 71 ss << " }"; |
| 72 return ss.str(); | 72 return ss.str(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 std::string RegistrationUpdateToString( | 75 std::string RegistrationUpdateToString( |
| 76 const invalidation::RegistrationUpdate& update) { | 76 const invalidation::RegistrationUpdate& update) { |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 89 std::stringstream ss; | 89 std::stringstream ss; |
| 90 ss << "{ "; | 90 ss << "{ "; |
| 91 ss << "operation: " | 91 ss << "operation: " |
| 92 << RegistrationUpdateToString(update_result.operation()) << ", "; | 92 << RegistrationUpdateToString(update_result.operation()) << ", "; |
| 93 ss << "status: " << StatusToString(update_result.status()); | 93 ss << "status: " << StatusToString(update_result.status()); |
| 94 ss << " }"; | 94 ss << " }"; |
| 95 return ss.str(); | 95 return ss.str(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace sync_notifier | 98 } // namespace sync_notifier |
| OLD | NEW |