Index: athena/content/shell/scheme_classifier_factory.cc |
diff --git a/athena/content/shell/scheme_classifier_factory.cc b/athena/content/shell/scheme_classifier_factory.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f7d34bf59d5e8f0b715929b60b7f373b164003bd |
--- /dev/null |
+++ b/athena/content/shell/scheme_classifier_factory.cc |
@@ -0,0 +1,39 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "athena/content/public/scheme_classifier_factory.h" |
+ |
+#include "components/metrics/proto/omnibox_input_type.pb.h" |
+#include "net/url_request/url_request.h" |
+ |
+namespace athena { |
+ |
+namespace { |
+ |
+// The AutocompleteSchemeClassifier implementation for athena_main. |
+class AthenaShellSchemeClassifier : public AutocompleteSchemeClassifier { |
+ public: |
+ AthenaShellSchemeClassifier() {} |
oshima
2014/09/19 21:04:28
virtual dtor
Jun Mukai
2014/09/19 21:06:53
Done.
|
+ |
+ // AutocompleteSchemeClassifier: |
+ virtual metrics::OmniboxInputType::Type GetInputTypeForScheme( |
+ const std::string& scheme) const OVERRIDE { |
+ if (net::URLRequest::IsHandledProtocol(scheme)) |
+ return metrics::OmniboxInputType::URL; |
+ return metrics::OmniboxInputType::INVALID; |
+ } |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(AthenaShellSchemeClassifier); |
+}; |
+ |
+} |
oshima
2014/09/19 21:04:28
// namespace
Jun Mukai
2014/09/19 21:06:53
Done.
|
+ |
+scoped_ptr<AutocompleteSchemeClassifier> CreateSchemeClassifier( |
+ content::BrowserContext* context) { |
+ return scoped_ptr<AutocompleteSchemeClassifier>( |
+ new AthenaShellSchemeClassifier()); |
+} |
+ |
+} // namespace athena |