Struggle first but with a reasonable time constraint for the problem and level of expertise depending on the importance of learning the actual problem. I would think most people find the 'quickest' or 'first' solution and stop there. The problem with struggling to find an answer to a solution is that it will not necessarily be the 'best' one or fit the standard of programming in a particular project. I may struggle and find a way to solve a problem, but that doesn't mean it's the most secure, fastest, most reliable, modular etc. How long will it take a developer to 'unlearn' mistakes they taught themselves solving a problem? This is a common in many DIY circles.
So I think googling should be about 'how to solve the problem' so that the process can be used for similar situations in the future. There are times when documentation is minimal or examples are poor so googling is a must just to learn how a language or framework even works. I have googled problems that we already solved just to see if the convention has changed since the original implementation of code.
A reason to google over struggling is if it is more important to solve the problem than the likelihood of the programmer using the language again. I knew a project that was written in PERL. Ultimately it will be replaced and may only have updates every now and then. It's not worth a developer spending all their time learning how to use the language and it's quirks if a simple update can be found by googling and the majority of their time will be in other languages. In this case, is it more important that a programmer learn PERL or good time management? Both are useful to the programmer but time management will probably be more useful in future projects and in personal development.