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

Unified Diff: chrome/browser/themes/browser_theme_pack.cc

Issue 481433005: Extensions: Move id_util functions to crx_file component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert last patchset. function returns Extension* and can't use an assert. Created 6 years, 4 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/themes/browser_theme_pack.cc
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index d67b15219801cbe5bc61a28742fe73e9f6c342bc..2c9530241ab8eb61d9e4765249908444cb478df6 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -18,8 +18,8 @@
#include "base/values.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/common/extensions/manifest_handlers/theme_handler.h"
+#include "components/crx_file/id_util.h"
#include "content/public/browser/browser_thread.h"
-#include "extensions/common/id_util.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/base/resource/data_pack.h"
@@ -724,9 +724,8 @@ scoped_refptr<BrowserThemePack> BrowserThemePack::BuildFromDataPack(
}
// TODO(erg): Check endianess once DataPack works on the other endian.
std::string theme_id(reinterpret_cast<char*>(pack->header_->theme_id),
- extensions::id_util::kIdSize);
- std::string truncated_id =
- expected_id.substr(0, extensions::id_util::kIdSize);
+ crx_file::id_util::kIdSize);
+ std::string truncated_id = expected_id.substr(0, crx_file::id_util::kIdSize);
if (theme_id != truncated_id) {
DLOG(ERROR) << "Wrong id: " << theme_id << " vs " << expected_id;
return NULL;
@@ -953,7 +952,7 @@ void BrowserThemePack::BuildHeader(const Extension* extension) {
header_->little_endian = 1;
const std::string& id = extension->id();
- memcpy(header_->theme_id, id.c_str(), extensions::id_util::kIdSize);
+ memcpy(header_->theme_id, id.c_str(), crx_file::id_util::kIdSize);
}
void BrowserThemePack::BuildTintsFromJSON(

Powered by Google App Engine
This is Rietveld 408576698