Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #include "athena/content/public/scheme_classifier_factory.h" | |
| 6 | |
| 7 #include "components/metrics/proto/omnibox_input_type.pb.h" | |
| 8 #include "net/url_request/url_request.h" | |
| 9 | |
| 10 namespace athena { | |
| 11 | |
| 12 namespace { | |
| 13 | |
| 14 // The AutocompleteSchemeClassifier implementation for athena_main. | |
| 15 class AthenaShellSchemeClassifier : public AutocompleteSchemeClassifier { | |
| 16 public: | |
| 17 AthenaShellSchemeClassifier() {} | |
|
oshima
2014/09/19 21:04:28
virtual dtor
Jun Mukai
2014/09/19 21:06:53
Done.
| |
| 18 | |
| 19 // AutocompleteSchemeClassifier: | |
| 20 virtual metrics::OmniboxInputType::Type GetInputTypeForScheme( | |
| 21 const std::string& scheme) const OVERRIDE { | |
| 22 if (net::URLRequest::IsHandledProtocol(scheme)) | |
| 23 return metrics::OmniboxInputType::URL; | |
| 24 return metrics::OmniboxInputType::INVALID; | |
| 25 } | |
| 26 | |
| 27 private: | |
| 28 DISALLOW_COPY_AND_ASSIGN(AthenaShellSchemeClassifier); | |
| 29 }; | |
| 30 | |
| 31 } | |
|
oshima
2014/09/19 21:04:28
// namespace
Jun Mukai
2014/09/19 21:06:53
Done.
| |
| 32 | |
| 33 scoped_ptr<AutocompleteSchemeClassifier> CreateSchemeClassifier( | |
| 34 content::BrowserContext* context) { | |
| 35 return scoped_ptr<AutocompleteSchemeClassifier>( | |
| 36 new AthenaShellSchemeClassifier()); | |
| 37 } | |
| 38 | |
| 39 } // namespace athena | |
| OLD | NEW |