First, complete the Thieves Guild quest line (ends with you returning the Skeleton Key).
Then you need to do Delvin and Vex's generic (radiant) jobs until you have done five (5) radiant quests for each of these cities:
It doesn't matter which kind of jobs you do for them. After you have completed five jobs in one city area, you will receive a special quest from Delvin for that area. Complete that quest to "upgrade" the Thieves Guild to a higher restoration status. Riften quests do not count. I would advise abandoning the Riften jobs unless you just want easy money. After you complete five jobs for one city, further jobs in that city won't progress the restoration. To make sure you only get jobs for cities you need, you can take a job from Vex/Delvin; then quicksave after you've ended dialogue with them, but before the job itself appears. If the job that you are given is for a city you do not need, simply load the quicksave and a new radiant quest will be assigned for you. This is easier and more efficient than simply abandoning quests, which also has been known to affect your "quests completed" count in the game.
In summary: 5 radiant quests for each city, and 4 special quests, one for each city, for a total of 24 quests.