In the bag
Virtually secured - as good as in one's possession.
The term in the bag with the meaning of 'virtually secured' is American and came into being in the early 20th century. It is slightly predated by an Australian/New Zealand version of in the bag which had a different meaning. That was in use by 1900 and is defined here in a later citation:
Sidney John Baker's The Australian language, 1945 - "A horse set to lose a race is said to be in the bag."
Of course, that isn't the meaning of the phrase as we currently understand it. The current version was coined because of a tradition of the New York Giants baseball team. This was recorded in May 1920, in the Ohio newspaper The Mansfield News:
"An old superstition was revived at the Polo grounds, New York, recently when Eddie Sicking was dispatched to the clubhouse with the ball bag at the start of the ninth possession of one run lead. This superstition originated during the run of twenty-six consecutive victories made by the Giants in 1916, the significance of it resting in a belief that if the bag is carried off the field at that stage of the game with the Giants in the lead the game is in the bag and cannot be lost."
See other phrases that were coined in the USA.