OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_OMNIBOX_BROWSER_MOCK_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_MOCK_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_MOCK_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_MOCK_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <utility> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "components/omnibox/browser/autocomplete_provider_client.h" | 12 #include "components/omnibox/browser/autocomplete_provider_client.h" |
12 #include "components/omnibox/browser/autocomplete_scheme_classifier.h" | 13 #include "components/omnibox/browser/autocomplete_scheme_classifier.h" |
13 #include "components/search_engines/search_terms_data.h" | 14 #include "components/search_engines/search_terms_data.h" |
14 #include "components/search_engines/template_url_service.h" | 15 #include "components/search_engines/template_url_service.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
16 | 17 |
17 struct AutocompleteMatch; | 18 struct AutocompleteMatch; |
18 | 19 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 bool prefer_keyword, | 72 bool prefer_keyword, |
72 bool allow_exact_keyword_match, | 73 bool allow_exact_keyword_match, |
73 metrics::OmniboxEventProto::PageClassification page_classification, | 74 metrics::OmniboxEventProto::PageClassification page_classification, |
74 AutocompleteMatch* match, | 75 AutocompleteMatch* match, |
75 GURL* alternate_nav_url)); | 76 GURL* alternate_nav_url)); |
76 MOCK_METHOD2(DeleteMatchingURLsForKeywordFromHistory, | 77 MOCK_METHOD2(DeleteMatchingURLsForKeywordFromHistory, |
77 void(history::KeywordID keyword_id, const base::string16& term)); | 78 void(history::KeywordID keyword_id, const base::string16& term)); |
78 MOCK_METHOD1(PrefetchImage, void(const GURL& url)); | 79 MOCK_METHOD1(PrefetchImage, void(const GURL& url)); |
79 | 80 |
80 void set_template_url_service(scoped_ptr<TemplateURLService> service) { | 81 void set_template_url_service(scoped_ptr<TemplateURLService> service) { |
81 template_url_service_ = service.Pass(); | 82 template_url_service_ = std::move(service); |
82 } | 83 } |
83 | 84 |
84 private: | 85 private: |
85 scoped_ptr<TemplateURLService> template_url_service_; | 86 scoped_ptr<TemplateURLService> template_url_service_; |
86 | 87 |
87 DISALLOW_COPY_AND_ASSIGN(MockAutocompleteProviderClient); | 88 DISALLOW_COPY_AND_ASSIGN(MockAutocompleteProviderClient); |
88 }; | 89 }; |
89 | 90 |
90 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 91 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
OLD | NEW |