Chromium Code Reviews| Index: chrome/browser/extensions/api/developer_private/developer_private_api.cc |
| diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc |
| index 4ff758d02ec3482ea5880b75d6e8f9494d5bc59e..63c6d87c78e86a4f0fce12f7ab711b2c78b81f0a 100644 |
| --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc |
| +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc |
| @@ -393,7 +393,7 @@ DeveloperPrivateGetItemsInfoFunction::CreateItemInfo(const Extension& item, |
| } |
| } |
| } else { |
| - for (std::vector<extensions::InstallWarning>::const_iterator it = |
| + for (std::vector<InstallWarning>::const_iterator it = |
| item.install_warnings().begin(); |
| it != item.install_warnings().end(); |
| ++it) { |
| @@ -426,8 +426,8 @@ DeveloperPrivateGetItemsInfoFunction::CreateItemInfo(const Extension& item, |
| } |
| if (item.is_app()) { |
| - info->app_launch_url.reset(new std::string( |
| - extensions::AppLaunchInfo::GetFullLaunchURL(&item).spec())); |
| + info->app_launch_url.reset( |
| + new std::string(AppLaunchInfo::GetFullLaunchURL(&item).spec())); |
| } |
| info->may_disable = system->management_policy()-> |
| @@ -546,7 +546,7 @@ ItemInspectViewList DeveloperPrivateGetItemsInfoFunction:: |
| bool extension_is_enabled) { |
| ItemInspectViewList result; |
| // Get the extension process's active views. |
| - extensions::ProcessManager* process_manager = |
| + ProcessManager* process_manager = |
| ExtensionSystem::Get(GetProfile())->process_manager(); |
| GetInspectablePagesForExtensionProcess( |
| extension, |
| @@ -603,7 +603,7 @@ bool DeveloperPrivateGetItemsInfoFunction::RunAsync() { |
| bool include_disabled = params->include_disabled; |
| bool include_terminated = params->include_terminated; |
| - extensions::ExtensionSet items; |
| + ExtensionSet items; |
| ExtensionRegistry* registry = ExtensionRegistry::Get(GetProfile()); |
| @@ -622,8 +622,8 @@ bool DeveloperPrivateGetItemsInfoFunction::RunAsync() { |
| std::map<std::string, ExtensionResource> id_to_icon; |
| ItemInfoList item_list; |
| - for (extensions::ExtensionSet::const_iterator iter = items.begin(); |
| - iter != items.end(); ++iter) { |
| + for (ExtensionSet::const_iterator iter = items.begin(); iter != items.end(); |
| + ++iter) { |
| const Extension& item = *iter->get(); |
| ExtensionResource item_resource = |
| @@ -661,8 +661,9 @@ bool DeveloperPrivateAllowFileAccessFunction::RunSync() { |
| ExtensionSystem* system = ExtensionSystem::Get(GetProfile()); |
| ManagementPolicy* management_policy = system->management_policy(); |
| - ExtensionService* service = GetProfile()->GetExtensionService(); |
| - const Extension* extension = service->GetInstalledExtension(params->item_id); |
| + const Extension* extension = |
| + ExtensionRegistry::Get(GetProfile()) |
| + ->GetExtensionById(params->item_id, ExtensionRegistry::EVERYTHING); |
| bool result = true; |
| if (!extension) { |
| @@ -688,8 +689,9 @@ bool DeveloperPrivateAllowIncognitoFunction::RunSync() { |
| AllowIncognito::Params::Create(*args_)); |
| EXTENSION_FUNCTION_VALIDATE(params.get()); |
| - ExtensionService* service = GetProfile()->GetExtensionService(); |
| - const Extension* extension = service->GetInstalledExtension(params->item_id); |
| + const Extension* extension = |
| + ExtensionRegistry::Get(GetProfile()) |
| + ->GetExtensionById(params->item_id, ExtensionRegistry::EVERYTHING); |
| bool result = true; |
| if (!extension) |
| @@ -715,14 +717,15 @@ bool DeveloperPrivateReloadFunction::RunSync() { |
| bool DeveloperPrivateShowPermissionsDialogFunction::RunSync() { |
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &extension_id_)); |
| - ExtensionService* service = GetProfile()->GetExtensionService(); |
| CHECK(!extension_id_.empty()); |
| AppWindowRegistry* registry = AppWindowRegistry::Get(GetProfile()); |
| DCHECK(registry); |
| AppWindow* app_window = |
| registry->GetAppWindowForRenderViewHost(render_view_host()); |
| prompt_.reset(new ExtensionInstallPrompt(app_window->web_contents())); |
| - const Extension* extension = service->GetInstalledExtension(extension_id_); |
| + const Extension* extension = |
| + ExtensionRegistry::Get(GetProfile()) |
| + ->GetExtensionById(extension_id_, ExtensionRegistry::EVERYTHING); |
| if (!extension) |
| return false; |
| @@ -730,7 +733,7 @@ bool DeveloperPrivateShowPermissionsDialogFunction::RunSync() { |
| // Released by InstallUIAbort or InstallUIProceed. |
| AddRef(); |
| std::vector<base::FilePath> retained_file_paths; |
| - if (extension->HasAPIPermission(extensions::APIPermission::kFileSystem)) { |
| + if (extension->HasAPIPermission(APIPermission::kFileSystem)) { |
| std::vector<apps::SavedFileEntry> retained_file_entries = |
| apps::SavedFilesService::Get(GetProfile()) |
| ->GetAllFileEntries(extension_id_); |
| @@ -780,7 +783,9 @@ bool DeveloperPrivateEnableFunction::RunSync() { |
| ManagementPolicy* policy = system->management_policy(); |
| ExtensionService* service = GetProfile()->GetExtensionService(); |
|
Devlin
2014/05/22 22:09:12
Since you're here, can you change this to system->
limasdf
2014/05/23 15:19:41
Done.
|
| - const Extension* extension = service->GetInstalledExtension(extension_id); |
| + const Extension* extension = |
| + ExtensionRegistry::Get(GetProfile()) |
| + ->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING); |
| if (!extension) { |
| LOG(ERROR) << "Did not find extension with id " << extension_id; |
| return false; |