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 #ifndef SYNC_SYNCABLE_SYNCABLE_H_ | 5 #ifndef SYNC_SYNCABLE_SYNCABLE_H_ |
6 #define SYNC_SYNCABLE_SYNCABLE_H_ | 6 #define SYNC_SYNCABLE_SYNCABLE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <bitset> | 10 #include <bitset> |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 } | 372 } |
373 inline sync_pb::EntitySpecifics& mutable_ref(ProtoField field) { | 373 inline sync_pb::EntitySpecifics& mutable_ref(ProtoField field) { |
374 return specifics_fields[field - PROTO_FIELDS_BEGIN]; | 374 return specifics_fields[field - PROTO_FIELDS_BEGIN]; |
375 } | 375 } |
376 inline Id& mutable_ref(IdField field) { | 376 inline Id& mutable_ref(IdField field) { |
377 return id_fields[field - ID_FIELDS_BEGIN]; | 377 return id_fields[field - ID_FIELDS_BEGIN]; |
378 } | 378 } |
379 | 379 |
380 syncable::ModelType GetServerModelType() const; | 380 syncable::ModelType GetServerModelType() const; |
381 | 381 |
382 // Does a case in-sensitive search for a given string, which must be | |
383 // lower case. | |
384 bool ContainsString(const std::string& lowercase_query) const; | |
385 | |
386 // Dumps all kernel info into a DictionaryValue and returns it. | 382 // Dumps all kernel info into a DictionaryValue and returns it. |
387 // Transfers ownership of the DictionaryValue to the caller. | 383 // Transfers ownership of the DictionaryValue to the caller. |
388 base::DictionaryValue* ToValue() const; | 384 base::DictionaryValue* ToValue() const; |
389 | 385 |
390 private: | 386 private: |
391 // Tracks whether this entry needs to be saved to the database. | 387 // Tracks whether this entry needs to be saved to the database. |
392 bool dirty_; | 388 bool dirty_; |
393 }; | 389 }; |
394 | 390 |
395 // A read-only meta entry. | 391 // A read-only meta entry. |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); | 1335 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); |
1340 | 1336 |
1341 // This function sets only the flags needed to get this entry to sync. | 1337 // This function sets only the flags needed to get this entry to sync. |
1342 bool MarkForSyncing(syncable::MutableEntry* e); | 1338 bool MarkForSyncing(syncable::MutableEntry* e); |
1343 | 1339 |
1344 } // namespace syncable | 1340 } // namespace syncable |
1345 | 1341 |
1346 std::ostream& operator <<(std::ostream&, const syncable::Blob&); | 1342 std::ostream& operator <<(std::ostream&, const syncable::Blob&); |
1347 | 1343 |
1348 #endif // SYNC_SYNCABLE_SYNCABLE_H_ | 1344 #endif // SYNC_SYNCABLE_SYNCABLE_H_ |
OLD | NEW |