OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "components/omnibox/browser/autocomplete_provider.h" | 5 #include "components/omnibox/browser/autocomplete_provider.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
22 #include "base/thread_task_runner_handle.h" | 22 #include "base/threading/thread_task_runner_handle.h" |
23 #include "components/metrics/proto/omnibox_event.pb.h" | 23 #include "components/metrics/proto/omnibox_event.pb.h" |
24 #include "components/omnibox/browser/autocomplete_controller.h" | 24 #include "components/omnibox/browser/autocomplete_controller.h" |
25 #include "components/omnibox/browser/autocomplete_input.h" | 25 #include "components/omnibox/browser/autocomplete_input.h" |
26 #include "components/omnibox/browser/autocomplete_match.h" | 26 #include "components/omnibox/browser/autocomplete_match.h" |
27 #include "components/omnibox/browser/autocomplete_provider_listener.h" | 27 #include "components/omnibox/browser/autocomplete_provider_listener.h" |
28 #include "components/omnibox/browser/keyword_provider.h" | 28 #include "components/omnibox/browser/keyword_provider.h" |
29 #include "components/omnibox/browser/mock_autocomplete_provider_client.h" | 29 #include "components/omnibox/browser/mock_autocomplete_provider_client.h" |
30 #include "components/omnibox/browser/search_provider.h" | 30 #include "components/omnibox/browser/search_provider.h" |
31 #include "components/search_engines/search_engines_switches.h" | 31 #include "components/search_engines/search_engines_switches.h" |
32 #include "components/search_engines/template_url.h" | 32 #include "components/search_engines/template_url.h" |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 EXPECT_FALSE(search_provider_field_trial_triggered_in_session()); | 765 EXPECT_FALSE(search_provider_field_trial_triggered_in_session()); |
766 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); | 766 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); |
767 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j0j4&", url.path()); | 767 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j0j4&", url.path()); |
768 | 768 |
769 // Test page classification and field trial triggered set. | 769 // Test page classification and field trial triggered set. |
770 set_search_provider_field_trial_triggered_in_session(true); | 770 set_search_provider_field_trial_triggered_in_session(true); |
771 EXPECT_TRUE(search_provider_field_trial_triggered_in_session()); | 771 EXPECT_TRUE(search_provider_field_trial_triggered_in_session()); |
772 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); | 772 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); |
773 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j1j4&", url.path()); | 773 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j1j4&", url.path()); |
774 } | 774 } |
OLD | NEW |