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

Unified Diff: chrome/browser/external_protocol/external_protocol_handler.cc

Issue 2664253006: Clears out external protocol data when cookies and site data is cleared. (Closed)
Patch Set: a Created 3 years, 10 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/external_protocol/external_protocol_handler.cc
diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc
index 29f98ed5cc60d7d2187b9138a1103399772be326..b9ce1eba4e090fb5b6f669fc7d3101aa98049730 100644
--- a/chrome/browser/external_protocol/external_protocol_handler.cc
+++ b/chrome/browser/external_protocol/external_protocol_handler.cc
@@ -345,3 +345,11 @@ void ExternalProtocolHandler::RecordHandleStateMetrics(bool checkbox_selected,
void ExternalProtocolHandler::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterDictionaryPref(prefs::kExcludedSchemes);
}
+
+// static
+void ExternalProtocolHandler::ClearData(Profile* profile) {
+ PrefService* prefs = profile->GetPrefs();
+ if (prefs) { // Maybe NULL during testing.
+ prefs->ClearPref(prefs::kExcludedSchemes);
dominickn 2017/02/10 03:10:29 I don't think you need the if check here - do the
ramyasharma 2017/02/15 05:03:36 Thanks I had not tried it without the check
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698