Commit d4261bea authored by xhwang@chromium.org's avatar xhwang@chromium.org

Minor code cleanup of component updater.

Review URL: https://codereview.chromium.org/14320035

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195445 0039d316-1c4b-4281-b951-d872f2087c98
parent 93e15565
...@@ -27,7 +27,7 @@ class ComponentInstaller { ...@@ -27,7 +27,7 @@ class ComponentInstaller {
public : public :
// Called by the component updater on the UI thread when there was a // Called by the component updater on the UI thread when there was a
// problem unpacking or verifying the component. |error| is a non-zero // problem unpacking or verifying the component. |error| is a non-zero
// value which is only meaninful to the component updater. // value which is only meaningful to the component updater.
virtual void OnUpdateError(int error) = 0; virtual void OnUpdateError(int error) = 0;
// Called by the component updater when a component has been unpacked // Called by the component updater when a component has been unpacked
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/pepper_flash.h" #include "chrome/common/pepper_flash.h"
#include "chrome/common/pepper_flash.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/plugin_service.h" #include "content/public/browser/plugin_service.h"
#include "content/public/common/pepper_plugin_info.h" #include "content/public/common/pepper_plugin_info.h"
...@@ -45,7 +44,7 @@ using content::PluginService; ...@@ -45,7 +44,7 @@ using content::PluginService;
namespace { namespace {
// CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb. // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb.
const uint8 sha2_hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20, const uint8 kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20,
0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11, 0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11,
0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70, 0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70,
0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c}; 0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c};
...@@ -340,7 +339,7 @@ void FinishPepperFlashUpdateRegistration(ComponentUpdateService* cus, ...@@ -340,7 +339,7 @@ void FinishPepperFlashUpdateRegistration(ComponentUpdateService* cus,
pepflash.name = "pepper_flash"; pepflash.name = "pepper_flash";
pepflash.installer = new PepperFlashComponentInstaller(version); pepflash.installer = new PepperFlashComponentInstaller(version);
pepflash.version = version; pepflash.version = version;
pepflash.pk_hash.assign(sha2_hash, &sha2_hash[sizeof(sha2_hash)]); pepflash.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]);
if (cus->RegisterComponent(pepflash) != ComponentUpdateService::kOk) { if (cus->RegisterComponent(pepflash) != ComponentUpdateService::kOk) {
NOTREACHED() << "Pepper Flash component registration failed."; NOTREACHED() << "Pepper Flash component registration failed.";
} }
......
...@@ -27,7 +27,7 @@ using content::BrowserThread; ...@@ -27,7 +27,7 @@ using content::BrowserThread;
namespace { namespace {
// CRX hash. The extension id is: npdjjkjlcidkjlamlmmdelcjbcpdjocm. // CRX hash. The extension id is: npdjjkjlcidkjlamlmmdelcjbcpdjocm.
const uint8 sha2_hash[] = {0xdf, 0x39, 0x9a, 0x9b, 0x28, 0x3a, 0x9b, 0x0c, const uint8 kSha2Hash[] = {0xdf, 0x39, 0x9a, 0x9b, 0x28, 0x3a, 0x9b, 0x0c,
0xbc, 0xc3, 0x4b, 0x29, 0x12, 0xf3, 0x9e, 0x2c, 0xbc, 0xc3, 0x4b, 0x29, 0x12, 0xf3, 0x9e, 0x2c,
0x19, 0x7a, 0x71, 0x4b, 0x0a, 0x7c, 0x80, 0x1c, 0x19, 0x7a, 0x71, 0x4b, 0x0a, 0x7c, 0x80, 0x1c,
0xf6, 0x29, 0x7c, 0x0a, 0x5f, 0xea, 0x67, 0xb7}; 0xf6, 0x29, 0x7c, 0x0a, 0x5f, 0xea, 0x67, 0xb7};
...@@ -74,7 +74,7 @@ void RecoveryRegisterHelper(ComponentUpdateService* cus, ...@@ -74,7 +74,7 @@ void RecoveryRegisterHelper(ComponentUpdateService* cus,
recovery.name = "recovery"; recovery.name = "recovery";
recovery.installer = new RecoveryComponentInstaller(version, prefs); recovery.installer = new RecoveryComponentInstaller(version, prefs);
recovery.version = version; recovery.version = version;
recovery.pk_hash.assign(sha2_hash, &sha2_hash[sizeof(sha2_hash)]); recovery.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]);
if (cus->RegisterComponent(recovery) != ComponentUpdateService::kOk) { if (cus->RegisterComponent(recovery) != ComponentUpdateService::kOk) {
NOTREACHED() << "Recovery component registration failed."; NOTREACHED() << "Recovery component registration failed.";
} }
......
...@@ -27,7 +27,7 @@ using content::GpuDataManager; ...@@ -27,7 +27,7 @@ using content::GpuDataManager;
namespace { namespace {
// CRX hash. The extension id is: nhfgdggnnopgbfdlpeoalgcjdgfafocg. // CRX hash. The extension id is: nhfgdggnnopgbfdlpeoalgcjdgfafocg.
const uint8 sha2_hash[] = {0xd7, 0x56, 0x36, 0x6d, 0xde, 0xf6, 0x15, 0x3b, const uint8 kSha2Hash[] = {0xd7, 0x56, 0x36, 0x6d, 0xde, 0xf6, 0x15, 0x3b,
0xf4, 0xe0, 0xb6, 0x29, 0x36, 0x50, 0x5e, 0x26, 0xf4, 0xe0, 0xb6, 0x29, 0x36, 0x50, 0x5e, 0x26,
0xbd, 0x77, 0x8b, 0x8e, 0x35, 0xc2, 0x7e, 0x43, 0xbd, 0x77, 0x8b, 0x8e, 0x35, 0xc2, 0x7e, 0x43,
0x52, 0x47, 0x62, 0xed, 0x12, 0xca, 0xcc, 0x6a}; 0x52, 0x47, 0x62, 0xed, 0x12, 0xca, 0xcc, 0x6a};
...@@ -155,7 +155,7 @@ void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus, ...@@ -155,7 +155,7 @@ void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus,
swiftshader.name = "Swift Shader"; swiftshader.name = "Swift Shader";
swiftshader.installer = new SwiftShaderComponentInstaller(version); swiftshader.installer = new SwiftShaderComponentInstaller(version);
swiftshader.version = version; swiftshader.version = version;
swiftshader.pk_hash.assign(sha2_hash, &sha2_hash[sizeof(sha2_hash)]); swiftshader.pk_hash.assign(kSha2Hash, &kSha2Hash[sizeof(kSha2Hash)]);
if (cus->RegisterComponent(swiftshader) != ComponentUpdateService::kOk) { if (cus->RegisterComponent(swiftshader) != ComponentUpdateService::kOk) {
NOTREACHED() << "SwiftShader component registration fail"; NOTREACHED() << "SwiftShader component registration fail";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment