This can be done at any point after the beginning of the game. Also, you do not need to pet 10 different dogs, you can pet the same dog 10 times. Head to "Pier 39" in the northern part of San Francisco. Just next door will be a dog, who spawns in this fixed locations. Pet him 10 times.
Here is a video guide with English commentary!
Here is a playlist of guides for this game!
https://www.youtube.com/playlist?list=PL-HeW6XkKdUKcpUn58waV...