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

Unified Diff: services/icu_data/icu_data_impl.cc

Issue 979043003: Fix shell_apptest for android. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: namespace Created 5 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
« no previous file with comments | « services/icu_data/embed_icu_data.py ('k') | shell/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/icu_data/icu_data_impl.cc
diff --git a/services/icu_data/icu_data_impl.cc b/services/icu_data/icu_data_impl.cc
index a2eb6f6afea771d674294d7be4567c7deebab7f8..be52bc059ef78ccca69715a6bfcfc1158919ed74 100644
--- a/services/icu_data/icu_data_impl.cc
+++ b/services/icu_data/icu_data_impl.cc
@@ -9,8 +9,8 @@
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/interface_factory.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
-#include "services/icu_data/data.h"
#include "services/icu_data/icu_data.mojom.h"
+#include "services/icu_data/kICUData.h"
namespace icu_data {
@@ -37,8 +37,8 @@ class ICUDataImpl : public mojo::ApplicationDelegate,
void Map(const mojo::String& sha1hash,
const mojo::Callback<void(mojo::ScopedSharedBufferHandle)>& callback)
override {
- if (std::string(sha1hash) != std::string(kICUDataTableHash)) {
- LOG(WARNING) << "Failed to match sha1sum. Expected " << kICUDataTableHash;
+ if (std::string(sha1hash) != std::string(kICUData.hash)) {
+ LOG(WARNING) << "Failed to match sha1sum. Expected " << kICUData.hash;
callback.Run(mojo::ScopedSharedBufferHandle());
return;
}
@@ -53,12 +53,12 @@ class ICUDataImpl : public mojo::ApplicationDelegate,
void EnsureBuffer() {
if (buffer_)
return;
- buffer_.reset(new mojo::SharedBuffer(kICUDataTableSize));
+ buffer_.reset(new mojo::SharedBuffer(kICUData.size));
void* ptr = nullptr;
- MojoResult rv = mojo::MapBuffer(buffer_->handle.get(), 0, kICUDataTableSize,
+ MojoResult rv = mojo::MapBuffer(buffer_->handle.get(), 0, kICUData.size,
&ptr, MOJO_MAP_BUFFER_FLAG_NONE);
CHECK_EQ(rv, MOJO_RESULT_OK);
- memcpy(ptr, kICUDataTable, kICUDataTableSize);
+ memcpy(ptr, kICUData.data, kICUData.size);
rv = mojo::UnmapBuffer(ptr);
CHECK_EQ(rv, MOJO_RESULT_OK);
}
« no previous file with comments | « services/icu_data/embed_icu_data.py ('k') | shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698