Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: chrome/browser/extensions/chrome_content_browser_client_extensions_part.h

Issue 2787573003: Remove DumpWithoutCrashing from ShouldAllowOpenURL. (Closed)
Patch Set: Fix unit_tests compile error Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/chrome_content_browser_client_extensions_part.h
diff --git a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.h b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.h
index 49eddb20559c499765f3213ced6f938a58a9cc7d..63ed0e2307ca3678ec297363a4785dccbb0a641e 100644
--- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.h
+++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.h
@@ -72,6 +72,31 @@ class ChromeContentBrowserClientExtensionsPart
content::BrowserContext* browser_context);
private:
+ FRIEND_TEST_ALL_PREFIXES(ChromeContentBrowserClientExtensionsPartTest,
+ ShouldAllowOpenURLMetricsForEmptySiteURL);
+ FRIEND_TEST_ALL_PREFIXES(ChromeContentBrowserClientExtensionsPartTest,
+ ShouldAllowOpenURLMetricsForKnownSchemes);
+
+ // Specifies reasons why web-accessible resource checks in ShouldAllowOpenURL
+ // might fail.
+ //
+ // This enum backs an UMA histogram. The order of existing values
+ // should not be changed, and new values should only be added before
+ // FAILURE_LAST.
+ enum ShouldAllowOpenURLFailureReason {
+ FAILURE_FILE_SYSTEM_URL = 0,
+ FAILURE_BLOB_URL,
+ FAILURE_SCHEME_NOT_HTTP_OR_HTTPS_OR_EXTENSION,
+ FAILURE_RESOURCE_NOT_WEB_ACCESSIBLE,
+ FAILURE_LAST,
+ };
+
+ // Records metrics when ShouldAllowOpenURL blocks a load. |site_url|
+ // corresponds to the SiteInstance that initiated the blocked load.
+ static void RecordShouldAllowOpenURLFailure(
+ ShouldAllowOpenURLFailureReason reason,
+ GURL site_url);
Devlin 2017/04/05 01:11:57 const &
alexmos 2017/04/05 17:24:51 Done.
+
// ChromeContentBrowserClientParts:
void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
void SiteInstanceGotProcess(content::SiteInstance* site_instance) override;

Powered by Google App Engine
This is Rietveld 408576698