Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: sync/syncable/syncable_util.h

Issue 11571092: sync: Move unique_client_tag hashing code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo some changes and move a test to syncable_util_unittest Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/sync.gyp ('k') | sync/syncable/syncable_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_UTIL_H_ 5 #ifndef SYNC_SYNCABLE_SYNCABLE_UTIL_H_
6 #define SYNC_SYNCABLE_SYNCABLE_UTIL_H_ 6 #define SYNC_SYNCABLE_SYNCABLE_UTIL_H_
7 7
8 #include <string>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "sync/internal_api/public/base/model_type.h"
11 13
12 namespace tracked_objects { 14 namespace tracked_objects {
13 class Location; 15 class Location;
14 } 16 }
15 17
16 namespace syncer { 18 namespace syncer {
17 namespace syncable { 19 namespace syncable {
18 20
19 class BaseTransaction; 21 class BaseTransaction;
20 class WriteTransaction; 22 class WriteTransaction;
21 class MutableEntry; 23 class MutableEntry;
22 class Id; 24 class Id;
23 25
24 void ChangeEntryIDAndUpdateChildren(WriteTransaction* trans, 26 void ChangeEntryIDAndUpdateChildren(WriteTransaction* trans,
25 MutableEntry* entry, 27 MutableEntry* entry,
26 const Id& new_id); 28 const Id& new_id);
27 29
28 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid); 30 bool IsLegalNewParent(BaseTransaction* trans, const Id& id, const Id& parentid);
29 31
30 bool SyncAssert(bool condition, 32 bool SyncAssert(bool condition,
31 const tracked_objects::Location& location, 33 const tracked_objects::Location& location,
32 const char* msg, 34 const char* msg,
33 BaseTransaction* trans); 35 BaseTransaction* trans);
34 36
35 int GetUnsyncedEntries(BaseTransaction* trans, 37 int GetUnsyncedEntries(BaseTransaction* trans,
36 std::vector<int64> *handles); 38 std::vector<int64> *handles);
37 39
40 // Generates a fixed-length tag for the given string under the given model_type.
41 std::string GenerateSyncableHash(
42 ModelType model_type, const std::string& client_tag);
43
38 } // namespace syncable 44 } // namespace syncable
39 } // namespace syncer 45 } // namespace syncer
40 46
41 #endif // SYNC_SYNCABLE_SYNCABLE_UTIL_H_ 47 #endif // SYNC_SYNCABLE_SYNCABLE_UTIL_H_
OLDNEW
« no previous file with comments | « sync/sync.gyp ('k') | sync/syncable/syncable_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698