Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: chrome/browser/autocomplete/shortcuts_provider_unittest.cc

Issue 1176153006: Componentize ShortcutsBackend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shortcuts_backend_dependency_injection
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/autocomplete/shortcuts_provider.h" 5 #include "chrome/browser/autocomplete/shortcuts_provider.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
17 #include "base/prefs/pref_service.h" 17 #include "base/prefs/pref_service.h"
18 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" 20 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
21 #include "chrome/browser/autocomplete/shortcuts_backend.h"
22 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" 21 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
23 #include "chrome/test/base/testing_profile.h" 22 #include "chrome/test/base/testing_profile.h"
24 #include "components/history/core/browser/history_service.h" 23 #include "components/history/core/browser/history_service.h"
25 #include "components/history/core/browser/url_database.h" 24 #include "components/history/core/browser/url_database.h"
26 #include "components/metrics/proto/omnibox_event.pb.h" 25 #include "components/metrics/proto/omnibox_event.pb.h"
27 #include "components/omnibox/autocomplete_input.h" 26 #include "components/omnibox/autocomplete_input.h"
28 #include "components/omnibox/autocomplete_match.h" 27 #include "components/omnibox/autocomplete_match.h"
29 #include "components/omnibox/autocomplete_provider.h" 28 #include "components/omnibox/autocomplete_provider.h"
30 #include "components/omnibox/autocomplete_result.h" 29 #include "components/omnibox/autocomplete_result.h"
31 #include "components/omnibox/in_memory_url_index.h" 30 #include "components/omnibox/in_memory_url_index.h"
31 #include "components/omnibox/shortcuts_backend.h"
32 #include "content/public/browser/notification_service.h" 32 #include "content/public/browser/notification_service.h"
33 #include "content/public/test/test_browser_thread.h" 33 #include "content/public/test/test_browser_thread.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 35
36 #if defined(ENABLE_EXTENSIONS) 36 #if defined(ENABLE_EXTENSIONS)
37 #include "extensions/browser/notification_types.h" 37 #include "extensions/browser/notification_types.h"
38 #include "extensions/common/extension.h" 38 #include "extensions/common/extension.h"
39 #include "extensions/common/extension_builder.h" 39 #include "extensions/common/extension_builder.h"
40 #include "extensions/common/value_builder.h" 40 #include "extensions/common/value_builder.h"
41 #endif 41 #endif
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL); 854 extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL);
855 content::NotificationService::current()->Notify( 855 content::NotificationService::current()->Notify(
856 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, 856 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
857 content::Source<Profile>(&profile_), 857 content::Source<Profile>(&profile_),
858 content::Details<extensions::UnloadedExtensionInfo>(&details)); 858 content::Details<extensions::UnloadedExtensionInfo>(&details));
859 859
860 // Now the URL should have disappeared. 860 // Now the URL should have disappeared.
861 RunTest(text, false, ExpectedURLs(), std::string(), base::string16()); 861 RunTest(text, false, ExpectedURLs(), std::string(), base::string16());
862 } 862 }
863 #endif 863 #endif
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_provider.h ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698