Disable Web Notifications in Incognito

Requests for notifications (and hence push messaging) permissions in
incognito will be auto-denied after a random 1-2 second delay.

This prevents websites from detecting incognito mode, by observing
that notifications are available in incognito but push messaging is not
(until https://crbug.com/401439 is implemented).

Depends on:
- https://codereview.chromium.org/1442083002

Known caveat: Prevents legitimate use of notifications in incognito :(

BUG=479679,542081

Review URL: https://codereview.chromium.org/1575623002

Cr-Commit-Position: refs/heads/master@{#369644}
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index dfc92c8..6f817da7 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -699,6 +699,7 @@
     }
 
     permission_info.source = info.source;
+    permission_info.is_incognito = profile_->IsOffTheRecord();
 
     if (info.primary_pattern == ContentSettingsPattern::Wildcard() &&
         info.secondary_pattern == ContentSettingsPattern::Wildcard()) {