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

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: rebase (needs fixing) Created 4 years, 2 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 d20f4be89e2f1b5586915bb39e659d2c17daab12..ea2a0504d8aa82f9d4c18f9eec3960c0a4843a03 100644
--- a/components/omnibox/browser/autocomplete_provider_unittest.cc
+++ b/components/omnibox/browser/autocomplete_provider_unittest.cc
@@ -34,6 +34,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) {
@@ -51,9 +52,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:
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | components/omnibox/browser/keyword_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698