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/shortcuts_provider.h" | 5 #include "components/omnibox/browser/shortcuts_provider.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <functional> | 11 #include <functional> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/message_loop/message_loop.h" | 18 #include "base/message_loop/message_loop.h" |
19 #include "base/prefs/pref_service.h" | |
20 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
21 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
22 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" | 21 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" |
23 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 22 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
24 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" | 23 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" |
25 #include "chrome/test/base/testing_profile.h" | 24 #include "chrome/test/base/testing_profile.h" |
26 #include "components/history/core/browser/history_service.h" | 25 #include "components/history/core/browser/history_service.h" |
27 #include "components/history/core/browser/url_database.h" | 26 #include "components/history/core/browser/url_database.h" |
28 #include "components/metrics/proto/omnibox_event.pb.h" | 27 #include "components/metrics/proto/omnibox_event.pb.h" |
29 #include "components/omnibox/browser/autocomplete_input.h" | 28 #include "components/omnibox/browser/autocomplete_input.h" |
30 #include "components/omnibox/browser/autocomplete_match.h" | 29 #include "components/omnibox/browser/autocomplete_match.h" |
31 #include "components/omnibox/browser/autocomplete_provider.h" | 30 #include "components/omnibox/browser/autocomplete_provider.h" |
32 #include "components/omnibox/browser/autocomplete_result.h" | 31 #include "components/omnibox/browser/autocomplete_result.h" |
33 #include "components/omnibox/browser/in_memory_url_index.h" | 32 #include "components/omnibox/browser/in_memory_url_index.h" |
34 #include "components/omnibox/browser/shortcuts_backend.h" | 33 #include "components/omnibox/browser/shortcuts_backend.h" |
| 34 #include "components/prefs/pref_service.h" |
35 #include "content/public/browser/notification_service.h" | 35 #include "content/public/browser/notification_service.h" |
36 #include "content/public/test/test_browser_thread.h" | 36 #include "content/public/test/test_browser_thread.h" |
37 #include "testing/gtest/include/gtest/gtest.h" | 37 #include "testing/gtest/include/gtest/gtest.h" |
38 | 38 |
39 #if defined(ENABLE_EXTENSIONS) | 39 #if defined(ENABLE_EXTENSIONS) |
40 #include "extensions/browser/notification_types.h" | 40 #include "extensions/browser/notification_types.h" |
41 #include "extensions/common/extension.h" | 41 #include "extensions/common/extension.h" |
42 #include "extensions/common/extension_builder.h" | 42 #include "extensions/common/extension_builder.h" |
43 #include "extensions/common/value_builder.h" | 43 #include "extensions/common/value_builder.h" |
44 #endif | 44 #endif |
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL); | 859 extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL); |
860 content::NotificationService::current()->Notify( | 860 content::NotificationService::current()->Notify( |
861 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, | 861 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, |
862 content::Source<Profile>(&profile_), | 862 content::Source<Profile>(&profile_), |
863 content::Details<extensions::UnloadedExtensionInfo>(&details)); | 863 content::Details<extensions::UnloadedExtensionInfo>(&details)); |
864 | 864 |
865 // Now the URL should have disappeared. | 865 // Now the URL should have disappeared. |
866 RunTest(text, false, ExpectedURLs(), std::string(), base::string16()); | 866 RunTest(text, false, ExpectedURLs(), std::string(), base::string16()); |
867 } | 867 } |
868 #endif | 868 #endif |
OLD | NEW |