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

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

Issue 12578008: Move CrxFile, FileReader, ExtensionResource to src/extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 7fc8159499aa19916a59c9f6789772bf0f8e7cfd..29c306fc8004b09c36db08df386888fdbe1bfc87 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/common/extensions/api/themes/theme_handler.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/common/id_util.h"
#include "grit/theme_resources.h"
#include "grit/ui_resources.h"
#include "net/base/file_stream.h"
@@ -569,8 +570,9 @@ 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),
- Extension::kIdSize);
- std::string truncated_id = expected_id.substr(0, Extension::kIdSize);
+ extensions::id_util::kIdSize);
+ std::string truncated_id =
+ expected_id.substr(0, extensions::id_util::kIdSize);
if (theme_id != truncated_id) {
DLOG(ERROR) << "Wrong id: " << theme_id << " vs " << expected_id;
return NULL;
@@ -802,7 +804,7 @@ void BrowserThemePack::BuildHeader(const Extension* extension) {
header_->little_endian = 1;
const std::string& id = extension->id();
- memcpy(header_->theme_id, id.c_str(), Extension::kIdSize);
+ memcpy(header_->theme_id, id.c_str(), extensions::id_util::kIdSize);
}
void BrowserThemePack::BuildTintsFromJSON(DictionaryValue* tints_value) {

Powered by Google App Engine
This is Rietveld 408576698