This is reported speech about a past event ('the previous summer'). The past perfect tense 'had had' is used to describe an event that happened before another past event or time.
Answer: had had