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

Unified Diff: components/dom_distiller/core/url_utils.cc

Issue 1972503002: Add flag "distillability-dev" for distillability development Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compatible naming Created 4 years, 3 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
« no previous file with comments | « components/dom_distiller/core/dom_distiller_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/url_utils.cc
diff --git a/components/dom_distiller/core/url_utils.cc b/components/dom_distiller/core/url_utils.cc
index c1bb35fcaf41f0560a0da64d483698bfa998092c..6ef2fe27c6d263cf3a53a07e8f6c6b7b863fc96c 100644
--- a/components/dom_distiller/core/url_utils.cc
+++ b/components/dom_distiller/core/url_utils.cc
@@ -8,6 +8,7 @@
#include "base/guid.h"
#include "base/strings/string_number_conversions.h"
+#include "components/dom_distiller/core/dom_distiller_features.h"
#include "components/dom_distiller/core/url_constants.h"
#include "grit/components_resources.h"
#include "net/base/url_util.h"
@@ -85,7 +86,11 @@ std::string GetValueForKeyInUrlPathQuery(const std::string& path,
}
bool IsUrlDistillable(const GURL& url) {
- return url.is_valid() && url.SchemeIsHTTPOrHTTPS();
+ if (!url.is_valid())
+ return false;
+ if (IsDistillabilityDevSet() && url.SchemeIsFile())
+ return true;
+ return url.SchemeIsHTTPOrHTTPS();
}
bool IsDistilledPage(const GURL& url) {
« no previous file with comments | « components/dom_distiller/core/dom_distiller_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698