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

Unified Diff: mojo/icu/icu.cc

Issue 2010853002: Delete //mojo/icu. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 | « mojo/icu/icu.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/icu/icu.cc
diff --git a/mojo/icu/icu.cc b/mojo/icu/icu.cc
deleted file mode 100644
index 803b3d72e3fcb88961e76457d920f6d6456eef14..0000000000000000000000000000000000000000
--- a/mojo/icu/icu.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/icu/icu.h"
-
-#include "mojo/icu/constants.h"
-#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/services/icu_data/interfaces/icu_data.mojom.h"
-#include "third_party/icu/source/common/unicode/putil.h"
-#include "third_party/icu/source/common/unicode/udata.h"
-
-#if !defined(OS_ANDROID)
-#include "base/i18n/icu_util.h"
-#endif
-
-namespace mojo {
-namespace icu {
-namespace {
-
-class Callback {
- public:
- void Run(mojo::ScopedSharedBufferHandle handle) const {
- void* ptr = nullptr;
- mojo::MapBuffer(handle.get(), 0, kDataSize, &ptr,
- MOJO_MAP_BUFFER_FLAG_NONE);
- UErrorCode err = U_ZERO_ERROR;
- udata_setCommonData(ptr, &err);
- // Leak the handle because we never unmap the buffer.
- (void)handle.release();
- };
-};
-
-} // namespace
-
-void Initialize(ApplicationImpl* app) {
-#if !defined(OS_ANDROID)
- // On desktop platforms, the icu data table is stored in a file on disk, which
- // can be loaded using base.
- base::i18n::InitializeICU();
- return;
-#endif
-
- icu_data::ICUDataPtr icu_data;
- app->ConnectToService("mojo:icu_data", &icu_data);
- icu_data->Map(kDataHash, Callback());
- icu_data.WaitForIncomingResponse();
-}
-
-} // namespace icu
-} // namespace mojo
« no previous file with comments | « mojo/icu/icu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698