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

Unified Diff: chrome/browser/extensions/api/management/management_api.cc

Issue 12093036: Move Extension Location and Type enums to Manifest, and move InstallWarning to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/management/management_api.cc
diff --git a/chrome/browser/extensions/api/management/management_api.cc b/chrome/browser/extensions/api/management/management_api.cc
index 2872ef31b68b953949f219956a5a116e0060079f..1ed7865cb61ffc95eb84bbe5e4ae00614636ed26 100644
--- a/chrome/browser/extensions/api/management/management_api.cc
+++ b/chrome/browser/extensions/api/management/management_api.cc
@@ -174,18 +174,18 @@ scoped_ptr<management::ExtensionInfo> CreateExtensionInfo(
}
switch (extension.location()) {
- case Extension::INTERNAL:
+ case Manifest::INTERNAL:
info->install_type = management::ExtensionInfo::INSTALL_TYPE_NORMAL;
break;
- case Extension::LOAD:
+ case Manifest::LOAD:
info->install_type = management::ExtensionInfo::INSTALL_TYPE_DEVELOPMENT;
break;
- case Extension::EXTERNAL_PREF:
- case Extension::EXTERNAL_REGISTRY:
- case Extension::EXTERNAL_PREF_DOWNLOAD:
+ case Manifest::EXTERNAL_PREF:
+ case Manifest::EXTERNAL_REGISTRY:
+ case Manifest::EXTERNAL_PREF_DOWNLOAD:
info->install_type = management::ExtensionInfo::INSTALL_TYPE_SIDELOAD;
break;
- case Extension::EXTERNAL_POLICY_DOWNLOAD:
+ case Manifest::EXTERNAL_POLICY_DOWNLOAD:
info->install_type = management::ExtensionInfo::INSTALL_TYPE_ADMIN;
break;
default:
@@ -203,7 +203,7 @@ void AddExtensionInfo(const ExtensionSet& extensions,
iter != extensions.end(); ++iter) {
const Extension& extension = **iter;
- if (extension.location() == Extension::COMPONENT)
+ if (extension.location() == Manifest::COMPONENT)
continue; // Skip built-in extensions.
extension_list->push_back(make_linked_ptr<management::ExtensionInfo>(
@@ -382,8 +382,8 @@ void ManagementGetPermissionWarningsByManifestFunction::OnParseSuccess(
CHECK(parsed_manifest);
scoped_refptr<Extension> extension = Extension::Create(
- FilePath(), Extension::INVALID, *parsed_manifest, Extension::NO_FLAGS,
- &error_);
+ FilePath(), Manifest::INVALID_LOCATION, *parsed_manifest,
+ Extension::NO_FLAGS, &error_);
if (!extension.get()) {
OnParseFailure(keys::kExtensionCreateError);
return;

Powered by Google App Engine
This is Rietveld 408576698