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
3 // found in the LICENSE file.
5 #include "athena/content/public/scheme_classifier_factory.h"
7 #include "components/metrics/proto/omnibox_input_type.pb.h"
8 #include "net/url_request/url_request.h"
14 // The AutocompleteSchemeClassifier implementation for athena_main.
15 class AthenaShellSchemeClassifier
: public AutocompleteSchemeClassifier
{
17 AthenaShellSchemeClassifier() {}
18 virtual ~AthenaShellSchemeClassifier() {}
20 // AutocompleteSchemeClassifier:
21 virtual metrics::OmniboxInputType::Type
GetInputTypeForScheme(
22 const std::string
& scheme
) const OVERRIDE
{
23 if (net::URLRequest::IsHandledProtocol(scheme
))
24 return metrics::OmniboxInputType::URL
;
25 return metrics::OmniboxInputType::INVALID
;
29 DISALLOW_COPY_AND_ASSIGN(AthenaShellSchemeClassifier
);
34 scoped_ptr
<AutocompleteSchemeClassifier
> CreateSchemeClassifier(
35 content::BrowserContext
* context
) {
36 return scoped_ptr
<AutocompleteSchemeClassifier
>(
37 new AthenaShellSchemeClassifier());