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

Unified Diff: components/omnibox/browser/keyword_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/keyword_provider_unittest.cc
diff --git a/components/omnibox/browser/keyword_provider_unittest.cc b/components/omnibox/browser/keyword_provider_unittest.cc
index 95c913d1934f9e119db103bfa90d51413e347575..04502adadf2c10f5662b88bded613a989565c75f 100644
--- a/components/omnibox/browser/keyword_provider_unittest.cc
+++ b/components/omnibox/browser/keyword_provider_unittest.cc
@@ -25,6 +25,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
+#include "url/url_constants.h"
using base::ASCIIToUTF16;
@@ -34,8 +35,10 @@ class TestingSchemeClassifier : public AutocompleteSchemeClassifier {
public:
metrics::OmniboxInputType::Type GetInputTypeForScheme(
const std::string& scheme) const override {
- if (net::URLRequest::IsHandledProtocol(scheme))
+ if (scheme == url::kHttpScheme || scheme == url::kHttpsScheme ||
+ scheme == url::kWsScheme || scheme == url::kWssScheme) {
return metrics::OmniboxInputType::URL;
+ }
return metrics::OmniboxInputType::INVALID;
}
};

Powered by Google App Engine
This is Rietveld 408576698