From 5e7fdb7551b1928d09eaf2114f19601458bc6c31 Mon Sep 17 00:00:00 2001 From: Noriyuki Takahashi Date: Thu, 28 Oct 2021 11:25:08 +0900 Subject: [PATCH] Remove MmapSyncInterface. Since Pepper is no longer supported, this interface can be removed. PiperOrigin-RevId: 406036931 --- src/base/BUILD.bazel | 7 ------ src/base/mmap.h | 16 ++++++------- src/base/mmap_sync_interface.h | 44 ---------------------------------- 3 files changed, 7 insertions(+), 60 deletions(-) delete mode 100644 src/base/mmap_sync_interface.h diff --git a/src/base/BUILD.bazel b/src/base/BUILD.bazel index f3bfdd0c6..f121b3401 100644 --- a/src/base/BUILD.bazel +++ b/src/base/BUILD.bazel @@ -644,19 +644,12 @@ cc_test_mozc( ], ) -cc_library_mozc( - name = "mmap_sync_interface", - hdrs = ["mmap_sync_interface.h"], - visibility = ["//visibility:private"], -) - cc_library_mozc( name = "mmap", srcs = ["mmap.cc"], hdrs = ["mmap.h"], deps = [ ":logging", - ":mmap_sync_interface", ":port", ":scoped_handle", ":util", diff --git a/src/base/mmap.h b/src/base/mmap.h index 93b52642b..f7ced76fe 100644 --- a/src/base/mmap.h +++ b/src/base/mmap.h @@ -30,18 +30,18 @@ #ifndef MOZC_BASE_MMAP_H_ #define MOZC_BASE_MMAP_H_ -#include - -#include "base/mmap_sync_interface.h" -#include "base/port.h" - +#include namespace mozc { -class Mmap : public MmapSyncInterface { +class Mmap final { public: Mmap(); - ~Mmap() override { Close(); } + + Mmap(const Mmap &) = delete; + Mmap &operator=(const Mmap &) = delete; + + ~Mmap() { Close(); } bool Open(const char *filename, const char *mode = "r"); void Close(); @@ -73,8 +73,6 @@ class Mmap : public MmapSyncInterface { private: char *text_; size_t size_; - - DISALLOW_COPY_AND_ASSIGN(Mmap); }; } // namespace mozc diff --git a/src/base/mmap_sync_interface.h b/src/base/mmap_sync_interface.h deleted file mode 100644 index 907a38c3c..000000000 --- a/src/base/mmap_sync_interface.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2010-2021, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef MOZC_BASE_MMAP_SYNC_INTERFACE_H_ -#define MOZC_BASE_MMAP_SYNC_INTERFACE_H_ - -namespace mozc { - -// This interface is used to resolve a cyclic dependency between PepperFileUtil -// and Mmap. -class MmapSyncInterface { - public: - virtual ~MmapSyncInterface() {} -}; - -} // namespace mozc - -#endif // MOZC_BASE_MMAP_SYNC_INTERFACE_H_