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

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

Issue 282103003: Moved IS_EPHEMERAL flag to extension prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up file header 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
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"
11 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/extensions/extension_ui_util.h"
12 #include "chrome/browser/extensions/extension_util.h" 13 #include "chrome/browser/extensions/extension_util.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/app_list/search/app_result.h" 15 #include "chrome/browser/ui/app_list/search/app_result.h"
15 #include "chrome/browser/ui/app_list/search/tokenized_string.h" 16 #include "chrome/browser/ui/app_list/search/tokenized_string.h"
16 #include "chrome/browser/ui/app_list/search/tokenized_string_match.h" 17 #include "chrome/browser/ui/app_list/search/tokenized_string_match.h"
17 #include "content/public/browser/notification_details.h" 18 #include "content/public/browser/notification_details.h"
18 #include "content/public/browser/notification_source.h" 19 #include "content/public/browser/notification_source.h"
19 #include "extensions/browser/extension_registry.h" 20 #include "extensions/browser/extension_registry.h"
20 #include "extensions/browser/extension_system.h" 21 #include "extensions/browser/extension_system.h"
21 #include "extensions/common/extension.h" 22 #include "extensions/common/extension.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 78 }
78 } 79 }
79 80
80 void AppSearchProvider::Stop() {} 81 void AppSearchProvider::Stop() {}
81 82
82 void AppSearchProvider::AddApps(const extensions::ExtensionSet& extensions) { 83 void AppSearchProvider::AddApps(const extensions::ExtensionSet& extensions) {
83 for (extensions::ExtensionSet::const_iterator iter = extensions.begin(); 84 for (extensions::ExtensionSet::const_iterator iter = extensions.begin();
84 iter != extensions.end(); ++iter) { 85 iter != extensions.end(); ++iter) {
85 const extensions::Extension* app = iter->get(); 86 const extensions::Extension* app = iter->get();
86 87
87 if (!app->ShouldDisplayInAppLauncher()) 88 if (!extensions::ui_util::ShouldDisplayInAppLauncher(app, profile_))
88 continue; 89 continue;
89 90
90 if (profile_->IsOffTheRecord() && 91 if (profile_->IsOffTheRecord() &&
91 !extensions::util::CanLoadInIncognito(app, profile_)) 92 !extensions::util::CanLoadInIncognito(app, profile_))
92 continue; 93 continue;
93 apps_.push_back(new App(app)); 94 apps_.push_back(new App(app));
94 } 95 }
95 } 96 }
96 97
97 void AppSearchProvider::RefreshApps() { 98 void AppSearchProvider::RefreshApps() {
(...skipping 11 matching lines...) Expand all
109 case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED: 110 case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED:
110 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: 111 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
111 RefreshApps(); 112 RefreshApps();
112 break; 113 break;
113 default: 114 default:
114 NOTREACHED(); 115 NOTREACHED();
115 } 116 }
116 } 117 }
117 118
118 } // namespace app_list 119 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/recommended_apps.cc ('k') | chrome/browser/ui/app_list/search/app_search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698