Both. It depends really Andy, for example, if the Song is Riff Driven, then I might well spend time getting the Riffs nailed first and then move on to the main structure of the song itself, or vice versa. If it is mainly a more conventional song, i.e. Intro, Verse, Chorus, Verse, Chorus, Solo, Chorus, Outro, then I'll get the chord sequences down first and then worry about Solos etc.
Mainly, in the early days, it was a case of get the chords down asap and then work from there, but as so much that I listen to these days is rather more intricate in make up, it tends to be the first thing that really grabs my attention that I'll work upon and then the rest follows.