diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 18:40:18 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-17 18:40:18 +0000 |
commit | c40cbc20c8a50d4e3a27d68aafa90188473a2f02 (patch) | |
tree | 05c6abf44268b309ee9260832e31ff9db368e87d | |
parent | f5986c409c99665eb6c8370270095bcb0de71917 (diff) | |
download | chromium_src-c40cbc20c8a50d4e3a27d68aafa90188473a2f02.zip chromium_src-c40cbc20c8a50d4e3a27d68aafa90188473a2f02.tar.gz chromium_src-c40cbc20c8a50d4e3a27d68aafa90188473a2f02.tar.bz2 |
sync: add some "static"s to functions
This is needed to work around a gcc bug when building with -Os.
But it's more correct anyway.
Review URL: http://codereview.chromium.org/395026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32186 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc b/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc index 8277859..239732c 100644 --- a/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc +++ b/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc @@ -335,8 +335,8 @@ namespace { class ServerDeletedPathChecker { public: - bool CausingConflict(const syncable::Entry& e, - const syncable::Entry& log_entry) { + static bool CausingConflict(const syncable::Entry& e, + const syncable::Entry& log_entry) { CHECK(e.good()) << "Missing parent in path of: " << log_entry; if (e.Get(syncable::IS_UNAPPLIED_UPDATE) && e.Get(syncable::SERVER_IS_DEL)) { @@ -349,11 +349,12 @@ class ServerDeletedPathChecker { return false; } } + // returns 0 if we should stop investigating the path. - syncable::Id GetAndExamineParent(syncable::BaseTransaction* trans, - syncable::Id id, - syncable::Id check_id, - const syncable::Entry& log_entry) { + static syncable::Id GetAndExamineParent(syncable::BaseTransaction* trans, + syncable::Id id, + syncable::Id check_id, + const syncable::Entry& log_entry) { syncable::Entry parent(trans, syncable::GET_BY_ID, id); CHECK(parent.good()) << "Tree inconsitency, missing id" << id << " " << log_entry; @@ -366,15 +367,16 @@ class ServerDeletedPathChecker { class LocallyDeletedPathChecker { public: - bool CausingConflict(const syncable::Entry& e, - const syncable::Entry& log_entry) { + static bool CausingConflict(const syncable::Entry& e, + const syncable::Entry& log_entry) { return e.good() && e.Get(syncable::IS_DEL) && e.Get(syncable::IS_UNSYNCED); } + // returns 0 if we should stop investigating the path. - syncable::Id GetAndExamineParent(syncable::BaseTransaction* trans, - syncable::Id id, - syncable::Id check_id, - const syncable::Entry& log_entry) { + static syncable::Id GetAndExamineParent(syncable::BaseTransaction* trans, + syncable::Id id, + syncable::Id check_id, + const syncable::Entry& log_entry) { syncable::Entry parent(trans, syncable::GET_BY_ID, id); if (!parent.good()) return syncable::kNullId; |