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

Unified Diff: chrome/browser/history/chrome_history_backend_client.cc

Issue 1924773002: TopSites: filter out non-WebSafe URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@topsites_cleanup
Patch Set: comment Created 4 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/history/chrome_history_backend_client.cc
diff --git a/chrome/browser/history/chrome_history_backend_client.cc b/chrome/browser/history/chrome_history_backend_client.cc
index 7159c12ba7ee0f8af84470e2da23222e0c353c46..d41df80e2d93ddc268f060985666afa9ced0c856 100644
--- a/chrome/browser/history/chrome_history_backend_client.cc
+++ b/chrome/browser/history/chrome_history_backend_client.cc
@@ -9,6 +9,7 @@
#include "chrome/common/features.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/version_info/version_info.h"
+#include "content/public/browser/child_process_security_policy.h"
#include "url/gurl.h"
#if BUILDFLAG(ANDROID_JAVA_UI)
@@ -72,6 +73,11 @@ bool ChromeHistoryBackendClient::ShouldReportDatabaseError() {
channel != version_info::Channel::BETA;
}
+bool ChromeHistoryBackendClient::IsWebSafe(const GURL& url) {
+ return content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme(
+ url.scheme());
+}
+
#if BUILDFLAG(ANDROID_JAVA_UI)
void ChromeHistoryBackendClient::OnHistoryBackendInitialized(
history::HistoryBackend* history_backend,
« no previous file with comments | « chrome/browser/history/chrome_history_backend_client.h ('k') | components/history/core/browser/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698