OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/app_list_controller_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/extensions/extension_system.h" | 8 #include "chrome/browser/extensions/extension_system.h" |
9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
10 #include "chrome/browser/extensions/install_tracker_factory.h" | 10 #include "chrome/browser/extensions/install_tracker_factory.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 GetExtension(profile, app_id)); | 136 GetExtension(profile, app_id)); |
137 } | 137 } |
138 | 138 |
139 void AppListControllerDelegate::SetExtensionLaunchType( | 139 void AppListControllerDelegate::SetExtensionLaunchType( |
140 Profile* profile, | 140 Profile* profile, |
141 const std::string& extension_id, | 141 const std::string& extension_id, |
142 extensions::LaunchType launch_type) { | 142 extensions::LaunchType launch_type) { |
143 ExtensionService* service = | 143 ExtensionService* service = |
144 extensions::ExtensionSystem::Get(profile)->extension_service(); | 144 extensions::ExtensionSystem::Get(profile)->extension_service(); |
145 extensions::SetLaunchType( | 145 extensions::SetLaunchType( |
146 service->extension_prefs(), extension_id, launch_type); | 146 service, extension_id, launch_type); |
147 } | 147 } |
148 | 148 |
149 bool AppListControllerDelegate::IsExtensionInstalled( | 149 bool AppListControllerDelegate::IsExtensionInstalled( |
150 Profile* profile, const std::string& app_id) { | 150 Profile* profile, const std::string& app_id) { |
151 return !!GetExtension(profile, app_id); | 151 return !!GetExtension(profile, app_id); |
152 } | 152 } |
153 | 153 |
154 extensions::InstallTracker* AppListControllerDelegate::GetInstallTrackerFor( | 154 extensions::InstallTracker* AppListControllerDelegate::GetInstallTrackerFor( |
155 Profile* profile) { | 155 Profile* profile) { |
156 if (extensions::ExtensionSystem::Get(profile)->extension_service()) | 156 if (extensions::ExtensionSystem::Get(profile)->extension_service()) |
157 return extensions::InstallTrackerFactory::GetForProfile(profile); | 157 return extensions::InstallTrackerFactory::GetForProfile(profile); |
158 return NULL; | 158 return NULL; |
159 } | 159 } |
160 | 160 |
161 void AppListControllerDelegate::GetApps(Profile* profile, | 161 void AppListControllerDelegate::GetApps(Profile* profile, |
162 ExtensionSet* out_apps) { | 162 ExtensionSet* out_apps) { |
163 ExtensionService* service = | 163 ExtensionService* service = |
164 extensions::ExtensionSystem::Get(profile)->extension_service(); | 164 extensions::ExtensionSystem::Get(profile)->extension_service(); |
165 DCHECK(service); | 165 DCHECK(service); |
166 out_apps->InsertAll(*service->extensions()); | 166 out_apps->InsertAll(*service->extensions()); |
167 out_apps->InsertAll(*service->disabled_extensions()); | 167 out_apps->InsertAll(*service->disabled_extensions()); |
168 out_apps->InsertAll(*service->terminated_extensions()); | 168 out_apps->InsertAll(*service->terminated_extensions()); |
169 } | 169 } |
OLD | NEW |