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

Side by Side Diff: chrome/browser/autocomplete/shortcuts_extensions_manager.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 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 #include "chrome/browser/autocomplete/shortcuts_extensions_manager.h" 5 #include "chrome/browser/autocomplete/shortcuts_extensions_manager.h"
6 6
7 #include "chrome/browser/autocomplete/shortcuts_backend.h"
8 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" 7 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
9 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "components/omnibox/shortcuts_backend.h"
11 #include "content/public/browser/notification_details.h" 11 #include "content/public/browser/notification_details.h"
12 #include "content/public/browser/notification_source.h" 12 #include "content/public/browser/notification_source.h"
13 13
14 #if defined(ENABLE_EXTENSIONS) 14 #if defined(ENABLE_EXTENSIONS)
15 #include "extensions/browser/notification_types.h" 15 #include "extensions/browser/notification_types.h"
16 #include "extensions/common/extension.h" 16 #include "extensions/common/extension.h"
17 #endif 17 #endif
18 18
19 ShortcutsExtensionsManager::ShortcutsExtensionsManager(Profile* profile) 19 ShortcutsExtensionsManager::ShortcutsExtensionsManager(Profile* profile)
20 : profile_(profile) { 20 : profile_(profile) {
(...skipping 18 matching lines...) Expand all
39 if (!shortcuts_backend) 39 if (!shortcuts_backend)
40 return; 40 return;
41 41
42 // When an extension is unloaded, we want to remove any Shortcuts associated 42 // When an extension is unloaded, we want to remove any Shortcuts associated
43 // with it. 43 // with it.
44 shortcuts_backend->DeleteShortcutsBeginningWithURL( 44 shortcuts_backend->DeleteShortcutsBeginningWithURL(
45 content::Details<extensions::UnloadedExtensionInfo>(details) 45 content::Details<extensions::UnloadedExtensionInfo>(details)
46 ->extension->url()); 46 ->extension->url());
47 #endif 47 #endif
48 } 48 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_backend_unittest.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698