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

Side by Side Diff: chrome/browser/ui/app_list/search/app_search_provider.cc

Issue 263833019: Small refactoring for app_search_provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698