| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/dom_distiller/core/url_utils.h" | 5 #include "components/dom_distiller/core/url_utils.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "components/dom_distiller/core/url_constants.h" | 10 #include "components/dom_distiller/core/url_constants.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 GURL dummy_url(kDummyInternalUrlPrefix + path); | 40 GURL dummy_url(kDummyInternalUrlPrefix + path); |
| 41 std::string value; | 41 std::string value; |
| 42 net::GetValueForKeyInQuery(dummy_url, key, &value); | 42 net::GetValueForKeyInQuery(dummy_url, key, &value); |
| 43 return value; | 43 return value; |
| 44 } | 44 } |
| 45 | 45 |
| 46 bool IsUrlDistillable(const GURL& url) { | 46 bool IsUrlDistillable(const GURL& url) { |
| 47 return url.is_valid() && url.SchemeIsHTTPOrHTTPS(); | 47 return url.is_valid() && url.SchemeIsHTTPOrHTTPS(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool IsUrlReportable(const std::string& scheme, const GURL& url) { |
| 51 return url.is_valid() && url.scheme() == scheme; |
| 52 } |
| 53 |
| 50 } // namespace url_utils | 54 } // namespace url_utils |
| 51 | 55 |
| 52 } // namespace dom_distiller | 56 } // namespace dom_distiller |
| OLD | NEW |