| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/invalidation/invalidation_util.h" | 5 #include "components/invalidation/base/invalidation_util.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "components/invalidation/invalidation.h" | 13 #include "components/invalidation/base/invalidation.h" |
| 14 #include "google/cacheinvalidation/include/types.h" | 14 #include "google/cacheinvalidation/include/types.h" |
| 15 #include "google/cacheinvalidation/types.pb.h" | 15 #include "google/cacheinvalidation/types.pb.h" |
| 16 | 16 |
| 17 namespace syncer { | 17 namespace syncer { |
| 18 | 18 |
| 19 bool ObjectIdLessThan::operator()(const invalidation::ObjectId& lhs, | 19 bool ObjectIdLessThan::operator()(const invalidation::ObjectId& lhs, |
| 20 const invalidation::ObjectId& rhs) const { | 20 const invalidation::ObjectId& rhs) const { |
| 21 return (lhs.source() < rhs.source()) || | 21 return (lhs.source() < rhs.source()) || |
| 22 (lhs.source() == rhs.source() && lhs.name() < rhs.name()); | 22 (lhs.source() == rhs.source() && lhs.name() < rhs.name()); |
| 23 } | 23 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return true; | 60 return true; |
| 61 } | 61 } |
| 62 | 62 |
| 63 std::string ObjectIdToString(const invalidation::ObjectId& object_id) { | 63 std::string ObjectIdToString(const invalidation::ObjectId& object_id) { |
| 64 std::string str; | 64 std::string str; |
| 65 base::JSONWriter::Write(*ObjectIdToValue(object_id), &str); | 65 base::JSONWriter::Write(*ObjectIdToValue(object_id), &str); |
| 66 return str; | 66 return str; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace syncer | 69 } // namespace syncer |
| OLD | NEW |