2 But what follows makes it more credible that His words, “I have manifested Your name to the men whom You gave me out of the world,” were spoken by Him of those who were already His disciples, and not of all who were yet to believe in Him. For after these words, He added: “Yours they were, and You gave them me; and they have kept Your word. Now they have known that all things, whatsoever You have given me, are of You: for I have given unto them the words which You gave me; and they have received them, and have known surely that I came out from You, and they have believed that You sent me.”
Although all these words also might have been said of all believers still to come, when that which was now a matter of hope had been turned into fact, inasmuch as they were words that still pointed to the future; yet we are impelled the more to understand Him as uttering them only of those who were at that time His disciples, by what He says shortly afterwards: “While I was with them, I kept them in Your name: those that You gave me I have kept, and none of them is lost, but the son of perdition; that the Scripture might be fulfilled”; meaning Judas, who betrayed Him, for He was the only one of the apostolic twelve that perished.
And then He adds, “And now come I to You,” from which it is manifest that it was of His own bodily presence that He said, “While I was with them, I kept them,” as if already that presence were no longer with them. For in this way He wished to intimate His own ascension as in the immediate future, when He said, “And now come I to You:” going, that is, to the Father's right hand; whence He is hereafter to come to judge the quick and the dead in the self-same bodily presence, according to the rule of faith and sound doctrine: for in His spiritual presence He was still, of course, to be with them after His ascension, and with the whole of His Church in this world even to the end of time. We cannot, therefore, rightly understand of whom He said, “While I was with them, I kept them,” save as those only who believed on Him, whom He had already begun to keep by His bodily presence, but was now to leave without it, in order that He might keep them with the Father by His spiritual presence.
Thereafter, indeed, He also unites with them the rest of His disciples, when He says, “Neither pray I for these alone, but for those also who shall believe in me through their word.” Where He shows still more clearly that He was not speaking before of all who belonged to Him, in the passage where He says, “I have manifested Your name unto the men whom You gave me,” but of those only who were listening to Him when He so spoke.
Source: Tractates on the Gospel of John (New Advent)