Actually, chances are you have given those permissions. Ever sign up for pretty much anything Google (Namely installing Chrome or browsing while logged in to a Google (GMail) account)? Then you gave those permissions. With the installs of both of those you accept terms and conditions that Google AdSense (Which is used for a large majority of internet-based advertisements) is allowed to use your browsing history to personalize ads for your viewing experience.
Actually, chances are you have given those permissions. Ever sign up for pretty much anything Google (Namely installing Chrome or browsing while logged in to a Google (GMail) account)? Then you gave those permissions. With the installs of both of those you accept terms and conditions that Google AdSense (Which is used for a large majority of internet-based advertisements) is allowed to use your browsing history to personalize ads for your viewing experience.