An observation I used to see with more frequency, is that a part of thinking depends on noticing patterns and connections between things. If you don't have any working or long-terms storage, this is impossible. Developing new insights will depend on internalizing at least some amount of information.
The googling to complete some small task (e.g. what was the second parameter's type?) -- I'm not sure I'd really consider that thinking, per se. It is definitely something that contributes to our general cognitive load, and the ubiquity of search surely is a welcome aid, as you suggest; there really are too many unimportant things to keep in our heads.
I mean, millions of years of evolution would disagree. Seems pretty shortsighted to declare memory useless.
This isn't necessarily true however, on a group selective level, remembering allows you to more effectively pass information to future generations, allowing your community to continue to adapt socially to your environment.
Sheep do this, with young sheep being explicitly taught how to handle a landscape by their parents, which is normally understood as showing them how to walk etc. but extends all the way to navigation and safe routes at least.
In our context that connection is far more obvious, even if that purpose has been in many ways assumed by tools; even if your brain remembers things solely for the purpose of thinking, it may not be for your thinking, and so we can say that memory, on an individual level, has a separate function.
The brain is for thinking, not for remembering.