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

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

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (extension-notifications) rebase Created 6 years, 4 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 | Annotate | Revision Log
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/autocomplete_result.h" 20 #include "chrome/browser/autocomplete/autocomplete_result.h"
21 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" 21 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
22 #include "chrome/browser/autocomplete/shortcuts_backend.h" 22 #include "chrome/browser/autocomplete/shortcuts_backend.h"
23 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" 23 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
24 #include "chrome/browser/chrome_notification_types.h"
25 #include "chrome/browser/history/history_service.h" 24 #include "chrome/browser/history/history_service.h"
26 #include "chrome/browser/history/in_memory_url_index.h" 25 #include "chrome/browser/history/in_memory_url_index.h"
27 #include "chrome/common/pref_names.h" 26 #include "chrome/common/pref_names.h"
28 #include "chrome/test/base/testing_profile.h" 27 #include "chrome/test/base/testing_profile.h"
29 #include "components/autocomplete/autocomplete_input.h" 28 #include "components/autocomplete/autocomplete_input.h"
30 #include "components/autocomplete/autocomplete_match.h" 29 #include "components/autocomplete/autocomplete_match.h"
31 #include "components/autocomplete/autocomplete_provider.h" 30 #include "components/autocomplete/autocomplete_provider.h"
32 #include "components/history/core/browser/url_database.h" 31 #include "components/history/core/browser/url_database.h"
33 #include "components/metrics/proto/omnibox_event.pb.h" 32 #include "components/metrics/proto/omnibox_event.pb.h"
34 #include "content/public/browser/notification_service.h" 33 #include "content/public/browser/notification_service.h"
35 #include "content/public/test/test_browser_thread.h" 34 #include "content/public/test/test_browser_thread.h"
35 #include "extensions/browser/notification_types.h"
36 #include "extensions/common/extension.h" 36 #include "extensions/common/extension.h"
37 #include "extensions/common/extension_builder.h" 37 #include "extensions/common/extension_builder.h"
38 #include "extensions/common/value_builder.h" 38 #include "extensions/common/value_builder.h"
39 #include "testing/gtest/include/gtest/gtest.h" 39 #include "testing/gtest/include/gtest/gtest.h"
40 40
41 using base::ASCIIToUTF16; 41 using base::ASCIIToUTF16;
42 42
43 // TestShortcutInfo ----------------------------------------------------------- 43 // TestShortcutInfo -----------------------------------------------------------
44 44
45 namespace { 45 namespace {
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 scoped_refptr<const extensions::Extension> extension = 833 scoped_refptr<const extensions::Extension> extension =
834 extensions::ExtensionBuilder() 834 extensions::ExtensionBuilder()
835 .SetManifest(extensions::DictionaryBuilder() 835 .SetManifest(extensions::DictionaryBuilder()
836 .Set("name", "Echo") 836 .Set("name", "Echo")
837 .Set("version", "1.0")) 837 .Set("version", "1.0"))
838 .SetID("cedabbhfglmiikkmdgcpjdkocfcmbkee") 838 .SetID("cedabbhfglmiikkmdgcpjdkocfcmbkee")
839 .Build(); 839 .Build();
840 extensions::UnloadedExtensionInfo details( 840 extensions::UnloadedExtensionInfo details(
841 extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL); 841 extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL);
842 content::NotificationService::current()->Notify( 842 content::NotificationService::current()->Notify(
843 chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, 843 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
844 content::Source<Profile>(&profile_), 844 content::Source<Profile>(&profile_),
845 content::Details<extensions::UnloadedExtensionInfo>(&details)); 845 content::Details<extensions::UnloadedExtensionInfo>(&details));
846 846
847 // Now the URL should have disappeared. 847 // Now the URL should have disappeared.
848 RunTest(text, false, ExpectedURLs(), std::string(), base::string16()); 848 RunTest(text, false, ExpectedURLs(), std::string(), base::string16());
849 } 849 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_backend.cc ('k') | chrome/browser/background/background_application_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698