| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/app_list/search/app_search_provider.h" | 5 #include "chrome/browser/ui/app_list/search/app_search_provider.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 apps_.clear(); | 98 apps_.clear(); |
| 99 ExtensionRegistry* registry = ExtensionRegistry::Get(profile_); | 99 ExtensionRegistry* registry = ExtensionRegistry::Get(profile_); |
| 100 AddApps(registry->enabled_extensions()); | 100 AddApps(registry->enabled_extensions()); |
| 101 AddApps(registry->disabled_extensions()); | 101 AddApps(registry->disabled_extensions()); |
| 102 AddApps(registry->terminated_extensions()); | 102 AddApps(registry->terminated_extensions()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void AppSearchProvider::Observe(int type, | 105 void AppSearchProvider::Observe(int type, |
| 106 const content::NotificationSource& source, | 106 const content::NotificationSource& source, |
| 107 const content::NotificationDetails& detaila) { | 107 const content::NotificationDetails& detaila) { |
| 108 RefreshApps(); | 108 switch (type) { |
| 109 case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED: |
| 110 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: |
| 111 RefreshApps(); |
| 112 break; |
| 113 default: |
| 114 NOTREACHED(); |
| 115 } |
| 109 } | 116 } |
| 110 | 117 |
| 111 } // namespace app_list | 118 } // namespace app_list |
| OLD | NEW |