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

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

Issue 11747025: Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restore missing registrations Created 7 years, 12 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 16584f1161ac84ac275d7525c640f4932f004a4b..47e29b094827218582f75a3b7c03852a51a7f23e 100644
--- a/chrome/browser/extensions/api/management/management_api.cc
+++ b/chrome/browser/extensions/api/management/management_api.cc
@@ -221,7 +221,7 @@ ExtensionService* AsyncExtensionManagementFunction::service() {
return profile()->GetExtensionService();
}
-bool GetAllExtensionsFunction::RunImpl() {
+bool ManagementGetAllFunction::RunImpl() {
ExtensionInfoList extensions;
ExtensionSystem* system = ExtensionSystem::Get(profile());
@@ -233,7 +233,7 @@ bool GetAllExtensionsFunction::RunImpl() {
return true;
}
-bool GetExtensionByIdFunction::RunImpl() {
+bool ManagementGetFunction::RunImpl() {
scoped_ptr<management::Get::Params> params(
management::Get::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -252,7 +252,7 @@ bool GetExtensionByIdFunction::RunImpl() {
return true;
}
-bool GetPermissionWarningsByIdFunction::RunImpl() {
+bool ManagementGetPermissionWarningsByIdFunction::RunImpl() {
scoped_ptr<management::GetPermissionWarningsById::Params> params(
management::GetPermissionWarningsById::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -271,12 +271,13 @@ bool GetPermissionWarningsByIdFunction::RunImpl() {
namespace {
-// This class helps GetPermissionWarningsByManifestFunction manage
+// This class helps ManagementGetPermissionWarningsByManifestFunction manage
// sending manifest JSON strings to the utility process for parsing.
class SafeManifestJSONParser : public UtilityProcessHostClient {
public:
- SafeManifestJSONParser(GetPermissionWarningsByManifestFunction* client,
- const std::string& manifest)
+ SafeManifestJSONParser(
+ ManagementGetPermissionWarningsByManifestFunction* client,
+ const std::string& manifest)
: client_(client),
manifest_(manifest) {}
@@ -347,7 +348,7 @@ class SafeManifestJSONParser : public UtilityProcessHostClient {
~SafeManifestJSONParser() {}
// The client who we'll report results back to.
- GetPermissionWarningsByManifestFunction* client_;
+ ManagementGetPermissionWarningsByManifestFunction* client_;
// Data to parse.
std::string manifest_;
@@ -360,7 +361,7 @@ class SafeManifestJSONParser : public UtilityProcessHostClient {
} // namespace
-bool GetPermissionWarningsByManifestFunction::RunImpl() {
+bool ManagementGetPermissionWarningsByManifestFunction::RunImpl() {
scoped_ptr<management::GetPermissionWarningsByManifest::Params> params(
management::GetPermissionWarningsByManifest::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -376,7 +377,7 @@ bool GetPermissionWarningsByManifestFunction::RunImpl() {
return true;
}
-void GetPermissionWarningsByManifestFunction::OnParseSuccess(
+void ManagementGetPermissionWarningsByManifestFunction::OnParseSuccess(
DictionaryValue* parsed_manifest) {
CHECK(parsed_manifest);
@@ -397,7 +398,7 @@ void GetPermissionWarningsByManifestFunction::OnParseSuccess(
Release();
}
-void GetPermissionWarningsByManifestFunction::OnParseFailure(
+void ManagementGetPermissionWarningsByManifestFunction::OnParseFailure(
const std::string& error) {
error_ = error;
SendResponse(false);
@@ -406,7 +407,7 @@ void GetPermissionWarningsByManifestFunction::OnParseFailure(
Release();
}
-bool LaunchAppFunction::RunImpl() {
+bool ManagementLaunchAppFunction::RunImpl() {
scoped_ptr<management::LaunchApp::Params> params(
management::LaunchApp::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -438,13 +439,13 @@ bool LaunchAppFunction::RunImpl() {
return true;
}
-SetEnabledFunction::SetEnabledFunction() {
+ManagementSetEnabledFunction::ManagementSetEnabledFunction() {
}
-SetEnabledFunction::~SetEnabledFunction() {
+ManagementSetEnabledFunction::~ManagementSetEnabledFunction() {
}
-bool SetEnabledFunction::RunImpl() {
+bool ManagementSetEnabledFunction::RunImpl() {
scoped_ptr<management::SetEnabled::Params> params(
management::SetEnabled::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -489,30 +490,30 @@ bool SetEnabledFunction::RunImpl() {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(&SetEnabledFunction::SendResponse, this, true));
+ base::Bind(&ManagementSetEnabledFunction::SendResponse, this, true));
return true;
}
-void SetEnabledFunction::InstallUIProceed() {
+void ManagementSetEnabledFunction::InstallUIProceed() {
service()->EnableExtension(extension_id_);
SendResponse(true);
Release();
}
-void SetEnabledFunction::InstallUIAbort(bool user_initiated) {
+void ManagementSetEnabledFunction::InstallUIAbort(bool user_initiated) {
error_ = keys::kUserDidNotReEnableError;
SendResponse(false);
Release();
}
-UninstallFunction::UninstallFunction() {
+ManagementUninstallFunction::ManagementUninstallFunction() {
}
-UninstallFunction::~UninstallFunction() {
+ManagementUninstallFunction::~ManagementUninstallFunction() {
}
-bool UninstallFunction::RunImpl() {
+bool ManagementUninstallFunction::RunImpl() {
scoped_ptr<management::Uninstall::Params> params(
management::Uninstall::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
@@ -554,11 +555,11 @@ bool UninstallFunction::RunImpl() {
}
// static
-void UninstallFunction::SetAutoConfirmForTest(bool should_proceed) {
+void ManagementUninstallFunction::SetAutoConfirmForTest(bool should_proceed) {
auto_confirm_for_test = should_proceed ? PROCEED : ABORT;
}
-void UninstallFunction::Finish(bool should_uninstall) {
+void ManagementUninstallFunction::Finish(bool should_uninstall) {
if (should_uninstall) {
bool success = service()->UninstallExtension(
extension_id_,
@@ -575,12 +576,12 @@ void UninstallFunction::Finish(bool should_uninstall) {
}
-void UninstallFunction::ExtensionUninstallAccepted() {
+void ManagementUninstallFunction::ExtensionUninstallAccepted() {
Finish(true);
Release();
}
-void UninstallFunction::ExtensionUninstallCanceled() {
+void ManagementUninstallFunction::ExtensionUninstallCanceled() {
Finish(false);
Release();
}

Powered by Google App Engine
This is Rietveld 408576698