| 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" |
| 11 #include "chrome/browser/extensions/launch_util.h" | 11 #include "chrome/browser/extensions/launch_util.h" |
| 12 #include "chrome/browser/ui/app_list/extension_uninstaller.h" | 12 #include "chrome/browser/ui/app_list/extension_uninstaller.h" |
| 13 #include "chrome/browser/ui/browser_navigator.h" | 13 #include "chrome/browser/ui/browser_navigator.h" |
| 14 #include "chrome/common/extensions/extension_constants.h" | 14 #include "chrome/common/extensions/extension_constants.h" |
| 15 #include "chrome/common/extensions/extension_set.h" | |
| 16 #include "chrome/common/extensions/manifest_url_handler.h" | 15 #include "chrome/common/extensions/manifest_url_handler.h" |
| 17 #include "extensions/browser/management_policy.h" | 16 #include "extensions/browser/management_policy.h" |
| 18 #include "extensions/common/extension.h" | 17 #include "extensions/common/extension.h" |
| 18 #include "extensions/common/extension_set.h" |
| 19 #include "net/base/url_util.h" | 19 #include "net/base/url_util.h" |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 const extensions::Extension* GetExtension(Profile* profile, | 23 const extensions::Extension* GetExtension(Profile* profile, |
| 24 const std::string& extension_id) { | 24 const std::string& extension_id) { |
| 25 const ExtensionService* service = | 25 const ExtensionService* service = |
| 26 extensions::ExtensionSystem::Get(profile)->extension_service(); | 26 extensions::ExtensionSystem::Get(profile)->extension_service(); |
| 27 const extensions::Extension* extension = | 27 const extensions::Extension* extension = |
| 28 service->GetInstalledExtension(extension_id); | 28 service->GetInstalledExtension(extension_id); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 extensions::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 |