Chromium Code Reviews| 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 default: | |
|
tfarina
2014/05/09 23:33:47
I think you need a break; after RefreshApps(), don
| |
| 113 NOTREACHED(); | |
| 114 } | |
| 109 } | 115 } |
| 110 | 116 |
| 111 } // namespace app_list | 117 } // namespace app_list |
| OLD | NEW |