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

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: fix tests Created 4 years, 7 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: 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 cfe4fcb9a21398cec21c8f68c5cf8d9b13147cb7..a079bdc97b175a486f72fb008f2333c82fc32139 100644
--- a/components/dom_distiller/core/url_utils.cc
+++ b/components/dom_distiller/core/url_utils.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/guid.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"
@@ -64,7 +65,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) {

Powered by Google App Engine
This is Rietveld 408576698