| Index: chrome/browser/extensions/sandboxed_unpacker.cc
|
| diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc
|
| index ea0c03b07e50c0b190540fe588ade0568cb7bc23..527cd341c5278be9350a94ee4dd538dd2d541d2d 100644
|
| --- a/chrome/browser/extensions/sandboxed_unpacker.cc
|
| +++ b/chrome/browser/extensions/sandboxed_unpacker.cc
|
| @@ -18,7 +18,6 @@
|
| #include "base/path_service.h"
|
| #include "base/sequenced_task_runner.h"
|
| #include "base/utf_string_conversions.h" // TODO(viettrungluu): delete me.
|
| -#include "chrome/browser/extensions/crx_file.h"
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/chrome_switches.h"
|
| @@ -32,6 +31,9 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/utility_process_host.h"
|
| #include "crypto/signature_verifier.h"
|
| +#include "extensions/common/constants.h"
|
| +#include "extensions/common/crx_file.h"
|
| +#include "extensions/common/id_util.h"
|
| #include "grit/generated_resources.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -557,8 +559,7 @@ bool SandboxedUnpacker::ValidateSignature() {
|
| std::string(reinterpret_cast<char*>(&key.front()), key.size());
|
| base::Base64Encode(public_key, &public_key_);
|
|
|
| - if (!Extension::GenerateId(public_key, &extension_id_))
|
| - return false;
|
| + extension_id_ = id_util::GenerateId(public_key);
|
|
|
| return true;
|
| }
|
| @@ -610,7 +611,7 @@ DictionaryValue* SandboxedUnpacker::RewriteManifestFile(
|
| }
|
|
|
| base::FilePath manifest_path =
|
| - extension_root_.Append(Extension::kManifestFilename);
|
| + extension_root_.Append(kManifestFilename);
|
| if (!file_util::WriteFile(manifest_path,
|
| manifest_json.data(), manifest_json.size())) {
|
| // Error saving manifest.json.
|
| @@ -749,7 +750,7 @@ bool SandboxedUnpacker::RewriteCatalogFiles() {
|
| // hack and remove the corresponding #include.
|
| base::FilePath relative_path =
|
| base::FilePath::FromWStringHack(UTF8ToWide(it.key()));
|
| - relative_path = relative_path.Append(Extension::kMessagesFilename);
|
| + relative_path = relative_path.Append(kMessagesFilename);
|
| if (relative_path.IsAbsolute() || relative_path.ReferencesParent()) {
|
| // Invalid path for catalog.
|
| ReportFailure(
|
|
|