In Chapter Thirty-One of Deathly Hallows Harry has the following thought about the Room of Requirement:
Tom Riddle, who confided in no one and operated alone, might have been arrogant enough to assume that he, and only he, had penetrated the deepest mysteries of Hogwarts Castle. Of course, Dumbledore and Flitwick, those model pupils, had never set foot in that particular place, but he, Harry, had strayed off the beaten track in his time at school — here at last was a secret he and Voldemort knew, that Dumbledore had never discovered —
But Harry was aware that Dumbledore had indeed set foot in the Room of Requirement. In Chapter Eighteen of Order of the Phoenix he says the following to Dobby:
“— and if you really needed a bathroom,” said Harry, suddenly remembering something Dumbledore had said at the Yule Ball the previous Christmas, “would it fill itself with chamber pots?”
This is a reference to Chapter Twenty-Three of Goblet of Fire:
“Oh I would never dream of assuming I know all Hogwarts’ secrets, Igor,” said Dumbledore amicably. “Only this morning, for instance, I took a wrong turning on the way to the bathroom and found myself in a beautifully proportioned room I have never seen before, containing a really rather magnificent collection of chamber pots. When I went back to investigate more closely, I discovered that the room had vanished. But I must keep an eye out for it. Possibly it is only accessible at five-thirty in the morning. Or it may only appear at the quarter moon — or when the seeker has an exceptionally full bladder.”
Harry clearly took Dumbledore’s comment seriously, as (back in Order of the Phoenix) when he told Ron and Hermione about the room he invoked Dumbledore:
“This room isn’t just some mad idea of Dobby’s; Dumbledore knows about it too, he mentioned it to me at the Yule Ball.” Hermione’s expression cleared.
Dumbledore told you about it?”
Just in passing,” said Harry, shrugging.“
Why, then, in Deathly Hallows does Harry think that Dumbledore has never been in the Room of Requirement?