[Local NTP Voice] Use www.google.TLD as the security origin

Before this CL, the microphone permission bubble would mention
"chrome-search://local-ntp" which isn't very friendly. After this CL,
the permission gets mapped to www.google.TLD (the Google base URL)
instead.

Bug: 766659
Change-Id: I5b8008c5e0ca063c31b0566edee9448a87be7fbc
Reviewed-on: https://chromium-review.googlesource.com/672543
Reviewed-by: Raymes Khoury <[email protected]>
Commit-Queue: Marc Treib <[email protected]>
Cr-Commit-Position: refs/heads/master@{#504006}
diff --git a/chrome/browser/permissions/permission_manager.h b/chrome/browser/permissions/permission_manager.h
index 4b770f1..f747a35 100644
--- a/chrome/browser/permissions/permission_manager.h
+++ b/chrome/browser/permissions/permission_manager.h
@@ -34,6 +34,15 @@
   explicit PermissionManager(Profile* profile);
   ~PermissionManager() override;
 
+  // Converts from |url|'s actual origin to the "canonical origin" that should
+  // be used for the purpose of requesting/storing permissions. For example, the
+  // origin of the local NTP gets mapped to the Google base URL instead. All the
+  // public methods below, such as RequestPermission or GetPermissionStatus,
+  // take the actual origin and do the canonicalization internally. You only
+  // need to call this directly if you do something else with the origin, such
+  // as display it in the UI.
+  GURL GetCanonicalOrigin(const GURL& url) const;
+
   // Callers from within chrome/ should use the methods which take the
   // ContentSettingsType enum. The methods which take PermissionType values
   // are for the content::PermissionManager overrides and shouldn't be used