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

Unified Diff: components/omnibox/browser/autocomplete_provider_unittest.cc

Issue 1868763002: Remove URLRequest::IsHandledProtocol and IsHandledURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: finish removing URLRequest::IsHandledProtocol() 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: components/omnibox/browser/autocomplete_provider_unittest.cc
diff --git a/components/omnibox/browser/autocomplete_provider_unittest.cc b/components/omnibox/browser/autocomplete_provider_unittest.cc
index 545783ef4ee90b2307e4fab34745f5a7086363c9..7d54ac6ca9a7b637cebec4f3ec46691ab4550aa6 100644
--- a/components/omnibox/browser/autocomplete_provider_unittest.cc
+++ b/components/omnibox/browser/autocomplete_provider_unittest.cc
@@ -31,6 +31,7 @@
#include "components/search_engines/template_url_service.h"
#include "components/search_engines/template_url_service_client.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "url/url_constants.h"
static std::ostream& operator<<(std::ostream& os,
const AutocompleteResult::const_iterator& it) {
@@ -48,9 +49,11 @@ class TestingSchemeClassifier : public AutocompleteSchemeClassifier {
metrics::OmniboxInputType::Type GetInputTypeForScheme(
const std::string& scheme) const override {
- return net::URLRequest::IsHandledProtocol(scheme)
- ? metrics::OmniboxInputType::URL
- : metrics::OmniboxInputType::INVALID;
+ if (scheme == url::kHttpScheme || scheme == url::kHttpsScheme ||
+ scheme == url::kWsScheme || scheme == url::kWssScheme) {
+ return metrics::OmniboxInputType::URL;
+ }
+ return metrics::OmniboxInputType::INVALID;
}
private:

Powered by Google App Engine
This is Rietveld 408576698