Currently, inside cluster_write.cpp's updateChunkWriteStatsAndSplitIfNeeded function, we check whether a chunk should be auto-split, depending on its current size and its desired chunk size.
Because we want to move the auto-split logic to the mongod side, this logic should be able to be called from OpObserver::onUpdate and OpObserver::onInserts. To make this possible, this logic will be encapsulated into a private function within CollectionShardingState, to be later called by CollectionShardingState::onUpdateOp and CollectionShardingState::onInsertOp, once the splitVector and splitChunk code has been refactored onto the mongod side.