Index: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
=================================================================== |
--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc (revision 179687) |
+++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc (working copy) |
@@ -127,10 +127,10 @@ |
return g_pending_approvals.Get().PopApproval(profile, extension_id); |
} |
-InstallBundleFunction::InstallBundleFunction() {} |
-InstallBundleFunction::~InstallBundleFunction() {} |
+WebstorePrivateInstallBundleFunction::WebstorePrivateInstallBundleFunction() {} |
+WebstorePrivateInstallBundleFunction::~WebstorePrivateInstallBundleFunction() {} |
-bool InstallBundleFunction::RunImpl() { |
+bool WebstorePrivateInstallBundleFunction::RunImpl() { |
ListValue* extensions = NULL; |
EXTENSION_FUNCTION_VALIDATE(args_->GetList(0, &extensions)); |
@@ -146,7 +146,7 @@ |
return true; |
} |
-bool InstallBundleFunction::ReadBundleInfo(ListValue* extensions, |
+bool WebstorePrivateInstallBundleFunction::ReadBundleInfo(ListValue* extensions, |
BundleInstaller::ItemList* items) { |
for (size_t i = 0; i < extensions->GetSize(); ++i) { |
DictionaryValue* details = NULL; |
@@ -166,13 +166,14 @@ |
return true; |
} |
-void InstallBundleFunction::OnBundleInstallApproved() { |
+void WebstorePrivateInstallBundleFunction::OnBundleInstallApproved() { |
bundle_->CompleteInstall( |
&(dispatcher()->delegate()->GetAssociatedWebContents()->GetController()), |
this); |
} |
-void InstallBundleFunction::OnBundleInstallCanceled(bool user_initiated) { |
+void WebstorePrivateInstallBundleFunction::OnBundleInstallCanceled( |
+ bool user_initiated) { |
if (user_initiated) |
error_ = "user_canceled"; |
else |
@@ -183,18 +184,20 @@ |
Release(); // Balanced in RunImpl(). |
} |
-void InstallBundleFunction::OnBundleInstallCompleted() { |
+void WebstorePrivateInstallBundleFunction::OnBundleInstallCompleted() { |
SendResponse(true); |
Release(); // Balanced in RunImpl(). |
} |
-BeginInstallWithManifestFunction::BeginInstallWithManifestFunction() |
- : use_app_installed_bubble_(false) {} |
+WebstorePrivateBeginInstallWithManifest3Function:: |
+ WebstorePrivateBeginInstallWithManifest3Function() |
+ : use_app_installed_bubble_(false) {} |
-BeginInstallWithManifestFunction::~BeginInstallWithManifestFunction() {} |
+WebstorePrivateBeginInstallWithManifest3Function:: |
+ ~WebstorePrivateBeginInstallWithManifest3Function() {} |
-bool BeginInstallWithManifestFunction::RunImpl() { |
+bool WebstorePrivateBeginInstallWithManifest3Function::RunImpl() { |
DictionaryValue* details = NULL; |
EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details)); |
CHECK(details); |
@@ -257,7 +260,8 @@ |
} |
-void BeginInstallWithManifestFunction::SetResultCode(ResultCode code) { |
+void WebstorePrivateBeginInstallWithManifest3Function::SetResultCode( |
+ ResultCode code) { |
switch (code) { |
case ERROR_NONE: |
SetResult(Value::CreateStringValue("")); |
@@ -288,7 +292,7 @@ |
} |
} |
-void BeginInstallWithManifestFunction::OnWebstoreParseSuccess( |
+void WebstorePrivateBeginInstallWithManifest3Function::OnWebstoreParseSuccess( |
const std::string& id, |
const SkBitmap& icon, |
DictionaryValue* parsed_manifest) { |
@@ -324,7 +328,7 @@ |
// Control flow finishes up in InstallUIProceed or InstallUIAbort. |
} |
-void BeginInstallWithManifestFunction::OnWebstoreParseFailure( |
+void WebstorePrivateBeginInstallWithManifest3Function::OnWebstoreParseFailure( |
const std::string& id, |
WebstoreInstallHelper::Delegate::InstallHelperResultCode result_code, |
const std::string& error_message) { |
@@ -351,7 +355,7 @@ |
Release(); |
} |
-void BeginInstallWithManifestFunction::InstallUIProceed() { |
+void WebstorePrivateBeginInstallWithManifest3Function::InstallUIProceed() { |
// This gets cleared in CrxInstaller::ConfirmInstall(). TODO(asargent) - in |
// the future we may also want to add time-based expiration, where a whitelist |
// entry is only valid for some number of minutes. |
@@ -375,7 +379,8 @@ |
Release(); |
} |
-void BeginInstallWithManifestFunction::InstallUIAbort(bool user_initiated) { |
+void WebstorePrivateBeginInstallWithManifest3Function::InstallUIAbort( |
+ bool user_initiated) { |
error_ = kUserCancelledError; |
SetResultCode(USER_CANCELLED); |
SendResponse(false); |
@@ -399,7 +404,7 @@ |
Release(); |
} |
-bool CompleteInstallFunction::RunImpl() { |
+bool WebstorePrivateCompleteInstallFunction::RunImpl() { |
std::string id; |
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &id)); |
if (!extensions::Extension::IdIsValid(id)) { |
@@ -428,7 +433,7 @@ |
return true; |
} |
-void CompleteInstallFunction::OnExtensionInstallSuccess( |
+void WebstorePrivateCompleteInstallFunction::OnExtensionInstallSuccess( |
const std::string& id) { |
if (test_webstore_installer_delegate) |
test_webstore_installer_delegate->OnExtensionInstallSuccess(id); |
@@ -439,7 +444,7 @@ |
Release(); |
} |
-void CompleteInstallFunction::OnExtensionInstallFailure( |
+void WebstorePrivateCompleteInstallFunction::OnExtensionInstallFailure( |
const std::string& id, |
const std::string& error, |
WebstoreInstaller::FailureReason reason) { |
@@ -456,12 +461,12 @@ |
} |
-bool GetBrowserLoginFunction::RunImpl() { |
+bool WebstorePrivateGetBrowserLoginFunction::RunImpl() { |
SetResult(CreateLoginResult(profile_->GetOriginalProfile())); |
return true; |
} |
-bool GetStoreLoginFunction::RunImpl() { |
+bool WebstorePrivateGetStoreLoginFunction::RunImpl() { |
ExtensionService* service = |
extensions::ExtensionSystem::Get(profile_)->extension_service(); |
ExtensionPrefs* prefs = service->extension_prefs(); |
@@ -474,7 +479,7 @@ |
return true; |
} |
-bool SetStoreLoginFunction::RunImpl() { |
+bool WebstorePrivateSetStoreLoginFunction::RunImpl() { |
std::string login; |
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &login)); |
ExtensionService* service = |
@@ -484,26 +489,28 @@ |
return true; |
} |
-GetWebGLStatusFunction::GetWebGLStatusFunction() { |
+WebstorePrivateGetWebGLStatusFunction::WebstorePrivateGetWebGLStatusFunction() { |
feature_checker_ = new GPUFeatureChecker( |
content::GPU_FEATURE_TYPE_WEBGL, |
- base::Bind(&GetWebGLStatusFunction::OnFeatureCheck, |
+ base::Bind(&WebstorePrivateGetWebGLStatusFunction::OnFeatureCheck, |
base::Unretained(this))); |
} |
-GetWebGLStatusFunction::~GetWebGLStatusFunction() {} |
+WebstorePrivateGetWebGLStatusFunction:: |
+ ~WebstorePrivateGetWebGLStatusFunction() {} |
-void GetWebGLStatusFunction::CreateResult(bool webgl_allowed) { |
+void WebstorePrivateGetWebGLStatusFunction::CreateResult(bool webgl_allowed) { |
SetResult(Value::CreateStringValue( |
webgl_allowed ? "webgl_allowed" : "webgl_blocked")); |
} |
-bool GetWebGLStatusFunction::RunImpl() { |
+bool WebstorePrivateGetWebGLStatusFunction::RunImpl() { |
feature_checker_->CheckGPUFeatureAvailability(); |
return true; |
} |
-void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) { |
+void WebstorePrivateGetWebGLStatusFunction::OnFeatureCheck( |
+ bool feature_allowed) { |
CreateResult(feature_allowed); |
SendResponse(true); |
} |