Validate URL using equality of each piece of the URL rather than string equality of only one portion when deciding whether or not to show a display notification.

BUG=505020
[email protected]

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

Cr-Commit-Position: refs/heads/master@{#337506}
diff --git a/chrome/browser/ui/chrome_pages.h b/chrome/browser/ui/chrome_pages.h
index 2dc9fea..79354d0 100644
--- a/chrome/browser/ui/chrome_pages.h
+++ b/chrome/browser/ui/chrome_pages.h
@@ -61,11 +61,15 @@
 // Constructs a settings GURL for the specified |sub_page|.
 GURL GetSettingsUrl(const std::string& sub_page);
 
+// Returns true if |url| is the URL for the settings subpage |sub_page|.
+bool IsSettingsSubPage(const GURL& url, const std::string& sub_page);
+
 // Returns true if |browser| is a trusted popup window containing a page with
 // matching |scheme| (or any trusted popup if |scheme| is empty).
 bool IsTrustedPopupWindowWithScheme(const Browser* browser,
                                     const std::string& scheme);
 
+
 // Various things that open in a settings UI.
 void ShowSettings(Browser* browser);
 void ShowSettingsSubPage(Browser* browser, const std::string& sub_page);