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

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

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move ExtensionSet to extensions namespace Created 7 years 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 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 scoped_ptr<AppResult> result( 67 scoped_ptr<AppResult> result(
68 new AppResult(profile_, (*app_it)->app_id(), list_controller_)); 68 new AppResult(profile_, (*app_it)->app_id(), list_controller_));
69 result->UpdateFromMatch((*app_it)->indexed_name(), match); 69 result->UpdateFromMatch((*app_it)->indexed_name(), match);
70 Add(result.PassAs<ChromeSearchResult>()); 70 Add(result.PassAs<ChromeSearchResult>());
71 } 71 }
72 } 72 }
73 73
74 void AppSearchProvider::Stop() {} 74 void AppSearchProvider::Stop() {}
75 75
76 void AppSearchProvider::AddApps(const ExtensionSet* extensions, 76 void AppSearchProvider::AddApps(const extensions::ExtensionSet* extensions,
77 ExtensionService* service) { 77 ExtensionService* service) {
78 for (ExtensionSet::const_iterator iter = extensions->begin(); 78 for (extensions::ExtensionSet::const_iterator iter = extensions->begin();
79 iter != extensions->end(); ++iter) { 79 iter != extensions->end(); ++iter) {
80 const extensions::Extension* app = iter->get(); 80 const extensions::Extension* app = iter->get();
81 81
82 if (!app->ShouldDisplayInAppLauncher()) 82 if (!app->ShouldDisplayInAppLauncher())
83 continue; 83 continue;
84 84
85 if (profile_->IsOffTheRecord() && 85 if (profile_->IsOffTheRecord() &&
86 !extension_util::CanLoadInIncognito(app, service)) 86 !extension_util::CanLoadInIncognito(app, service))
87 continue; 87 continue;
88 apps_.push_back(new App(app)); 88 apps_.push_back(new App(app));
(...skipping 14 matching lines...) Expand all
103 AddApps(extension_service->terminated_extensions(), extension_service); 103 AddApps(extension_service->terminated_extensions(), extension_service);
104 } 104 }
105 105
106 void AppSearchProvider::Observe(int type, 106 void AppSearchProvider::Observe(int type,
107 const content::NotificationSource& source, 107 const content::NotificationSource& source,
108 const content::NotificationDetails& detaila) { 108 const content::NotificationDetails& detaila) {
109 RefreshApps(); 109 RefreshApps();
110 } 110 }
111 111
112 } // namespace app_list 112 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698