remove the openbsd specific storage monitor dummy implementation because
chromium ships with its own dummy implementation that we can use
This commit is contained in:
parent
fedbf04869
commit
ef1c07b8f8
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.502 2020/04/11 19:05:09 robert Exp $
|
||||
# $OpenBSD: Makefile,v 1.503 2020/04/12 15:09:41 robert Exp $
|
||||
|
||||
.include <bsd.port.arch.mk>
|
||||
|
||||
@ -13,7 +13,7 @@ DPB_PROPERTIES= lonesome
|
||||
COMMENT= Chromium browser
|
||||
|
||||
V= 81.0.4044.92
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
DISTNAME= chromium-${V}
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-components_storage_monitor_BUILD_gn,v 1.6 2019/11/05 22:30:27 robert Exp $
|
||||
|
||||
Index: components/storage_monitor/BUILD.gn
|
||||
--- components/storage_monitor/BUILD.gn.orig
|
||||
+++ components/storage_monitor/BUILD.gn
|
||||
@@ -81,6 +81,13 @@ static_library("storage_monitor") {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (is_openbsd) {
|
||||
+ sources += [
|
||||
+ "storage_monitor_openbsd.cc",
|
||||
+ "storage_monitor_openbsd.h"
|
||||
+ ]
|
||||
+ }
|
||||
+
|
||||
if (use_udev) {
|
||||
sources += [
|
||||
"udev_util_linux.cc",
|
@ -1,58 +0,0 @@
|
||||
$OpenBSD: patch-components_storage_monitor_storage_monitor_openbsd_cc,v 1.3 2016/03/06 10:51:14 robert Exp $
|
||||
--- components/storage_monitor/storage_monitor_openbsd.cc.orig.port Sat Mar 5 17:44:02 2016
|
||||
+++ components/storage_monitor/storage_monitor_openbsd.cc Sat Mar 5 17:49:32 2016
|
||||
@@ -0,0 +1,54 @@
|
||||
+// Copyright 2014 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.
|
||||
+
|
||||
+// StorageMonitorOpenBSD implementation.
|
||||
+
|
||||
+#include "components/storage_monitor/storage_monitor_openbsd.h"
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#include <list>
|
||||
+
|
||||
+#include "base/bind.h"
|
||||
+#include "base/metrics/histogram.h"
|
||||
+#include "base/process/kill.h"
|
||||
+#include "base/process/launch.h"
|
||||
+#include "base/stl_util.h"
|
||||
+#include "base/strings/string_number_conversions.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "base/strings/utf_string_conversions.h"
|
||||
+#include "components/storage_monitor/media_storage_util.h"
|
||||
+#include "components/storage_monitor/removable_device_constants.h"
|
||||
+#include "components/storage_monitor/storage_info.h"
|
||||
+
|
||||
+using content::BrowserThread;
|
||||
+
|
||||
+namespace storage_monitor {
|
||||
+
|
||||
+namespace {
|
||||
+
|
||||
+} // namespace
|
||||
+
|
||||
+StorageMonitorOpenBSD::StorageMonitorOpenBSD() {
|
||||
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
+}
|
||||
+
|
||||
+StorageMonitorOpenBSD::~StorageMonitorOpenBSD() {
|
||||
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
+}
|
||||
+
|
||||
+void StorageMonitorOpenBSD::Init() {
|
||||
+}
|
||||
+
|
||||
+bool StorageMonitorOpenBSD::GetStorageInfoForPath(
|
||||
+ const base::FilePath& path,
|
||||
+ StorageInfo* device_info) const {
|
||||
+ return false; // TODO
|
||||
+}
|
||||
+
|
||||
+StorageMonitor* StorageMonitor::CreateInternal() {
|
||||
+ return new StorageMonitorOpenBSD();
|
||||
+}
|
||||
+
|
||||
+} // namespace storage_monitor
|
@ -1,49 +0,0 @@
|
||||
$OpenBSD: patch-components_storage_monitor_storage_monitor_openbsd_h,v 1.5 2016/07/31 13:11:44 robert Exp $
|
||||
--- components/storage_monitor/storage_monitor_openbsd.h.orig.port Thu Jul 21 10:25:29 2016
|
||||
+++ components/storage_monitor/storage_monitor_openbsd.h Thu Jul 21 11:45:22 2016
|
||||
@@ -0,0 +1,45 @@
|
||||
+// Copyright 2014 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.
|
||||
+
|
||||
+// StorageMonitorOpenBSD processes mount point change events, notifies listeners
|
||||
+// about the addition and deletion of media devices, and answers queries about
|
||||
+// mounted devices.
|
||||
+// StorageMonitorOpenBSD lives on the UI thread, and uses ???
|
||||
+// the FILE thread to get mount point change events.
|
||||
+
|
||||
+#ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_OPENBSD_H_
|
||||
+#define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_OPENBSD_H_
|
||||
+
|
||||
+#include <map>
|
||||
+#include <string>
|
||||
+
|
||||
+#include "base/compiler_specific.h"
|
||||
+#include "base/files/file_path.h"
|
||||
+#include "base/files/file_path_watcher.h"
|
||||
+#include "base/memory/weak_ptr.h"
|
||||
+#include "components/storage_monitor/storage_monitor.h"
|
||||
+#include "content/public/browser/browser_thread.h"
|
||||
+
|
||||
+namespace storage_monitor {
|
||||
+
|
||||
+class StorageMonitorOpenBSD : public StorageMonitor {
|
||||
+ public:
|
||||
+ // Should only be called by browser start up code.
|
||||
+ // Use StorageMonitor::GetInstance() instead.
|
||||
+ explicit StorageMonitorOpenBSD();
|
||||
+ virtual ~StorageMonitorOpenBSD();
|
||||
+
|
||||
+ // Must be called for StorageMonitorOpenBSD to work.
|
||||
+ void Init() override;
|
||||
+ private:
|
||||
+ // StorageMonitor implementation.
|
||||
+ virtual bool GetStorageInfoForPath(const base::FilePath& path,
|
||||
+ StorageInfo* device_info) const override;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(StorageMonitorOpenBSD);
|
||||
+};
|
||||
+
|
||||
+} // namespace storage_monitor
|
||||
+
|
||||
+#endif // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_OPENBSD_H_
|
Loading…
Reference in New Issue
Block a user