File chromium-norar.patch of Package chromium

diff -up chromium-113.0.5672.24/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-113.0.5672.24/chrome/common/safe_browsing/BUILD.gn
--- chromium-113.0.5672.24/chrome/common/safe_browsing/BUILD.gn.nounrar	2023-04-07 13:11:59.495927476 +0200
+++ chromium-113.0.5672.24/chrome/common/safe_browsing/BUILD.gn	2023-04-07 13:47:57.004758029 +0200
@@ -143,8 +143,6 @@ source_set("safe_browsing") {
       "protobuf_message_log_macros.h",
       "protobuf_message_read_macros.h",
       "protobuf_message_write_macros.h",
-      "rar_analyzer.cc",
-      "rar_analyzer.h",
       "seven_zip_analyzer.cc",
       "seven_zip_analyzer.h",
       "zip_analyzer.cc",
@@ -160,7 +158,6 @@ source_set("safe_browsing") {
       "//components/safe_browsing/content/common:file_type_policies",
       "//components/safe_browsing/core/common",
       "//third_party/lzma_sdk/google:seven_zip_reader",
-      "//third_party/unrar:unrar",
     ]
 
     if (is_linux) {
diff -up chromium-113.0.5672.24/chrome/common/safe_browsing/DEPS.nounrar chromium-113.0.5672.24/chrome/common/safe_browsing/DEPS
--- chromium-113.0.5672.24/chrome/common/safe_browsing/DEPS.nounrar	2023-04-04 20:41:26.000000000 +0200
+++ chromium-113.0.5672.24/chrome/common/safe_browsing/DEPS	2023-04-07 13:11:59.495927476 +0200
@@ -3,7 +3,6 @@ include_rules = [
   "+components/safe_browsing/core/common",
   "+third_party/maldoca",
   "+third_party/protobuf",
-  "+third_party/unrar",
   "+third_party/zlib",
   "+third_party/lzma_sdk/google",
 ]
diff -up chromium-113.0.5672.24/chrome/services/file_util/BUILD.gn.nounrar chromium-113.0.5672.24/chrome/services/file_util/BUILD.gn
diff -up chromium-113.0.5672.24/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-113.0.5672.24/chrome/services/file_util/safe_archive_analyzer.cc
--- chromium-113.0.5672.24/chrome/services/file_util/safe_archive_analyzer.cc.nounrar	2023-04-07 13:11:59.495927476 +0200
+++ chromium-113.0.5672.24/chrome/services/file_util/safe_archive_analyzer.cc	2023-04-07 13:52:52.998109006 +0200
@@ -61,6 +61,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
     base::File rar_file,
     mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
     AnalyzeRarFileCallback callback) {
+#if 0
   DCHECK(rar_file.IsValid());
   temp_file_getter_.Bind(std::move(temp_file_getter));
   callback_ = std::move(callback);
@@ -76,6 +77,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
   rar_analyzer_.Init(std::move(rar_file), base::FilePath(),
                      std::move(analysis_finished_callback),
                      std::move(temp_file_getter_callback), &results_);
+#else
+  NOTREACHED();
+#endif
 }
 
 void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
diff -up chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.cc.me chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.cc
--- chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.cc.me	2023-04-23 18:10:06.103858362 +0200
+++ chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.cc	2023-04-23 18:12:05.428092347 +0200
@@ -18,7 +18,7 @@
 #include "base/time/time.h"
 #include "build/build_config.h"
 #include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/common/safe_browsing/rar_analyzer.h"
+//#include "chrome/common/safe_browsing/rar_analyzer.h"
 #include "components/safe_browsing/content/common/file_type_policies.h"
 #include "components/safe_browsing/core/common/features.h"
 #include "components/safe_browsing/core/common/proto/csd.pb.h"
@@ -132,14 +132,14 @@ bool ZipAnalyzer::AnalyzeNestedArchive(
                                std::move(nested_analysis_finished_callback),
                                get_temp_file_callback_, results_);
     return true;
-  } else if (file_type == DownloadFileType::RAR) {
+  } /* else if (file_type == DownloadFileType::RAR) {
     nested_rar_analyzer_ = std::make_unique<safe_browsing::RarAnalyzer>();
     nested_rar_analyzer_->Init(temp_file_.Duplicate(),
                                root_zip_path_.Append(path),
                                std::move(nested_analysis_finished_callback),
                                get_temp_file_callback_, results_);
     return true;
-  }
+  }*/
   return false;
 }
 
diff -up chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.h.me chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.h
--- chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.h.me	2023-04-23 18:12:11.316203496 +0200
+++ chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.h	2023-04-23 18:12:26.827498082 +0200
@@ -78,7 +78,7 @@ class ZipAnalyzer {
   // DFS.
   // TODO(crbug.com/1426164) Create a common class to hold all analyzers.
   std::unique_ptr<safe_browsing::ZipAnalyzer> nested_zip_analyzer_;
-  std::unique_ptr<safe_browsing::RarAnalyzer> nested_rar_analyzer_;
+//  std::unique_ptr<safe_browsing::RarAnalyzer> nested_rar_analyzer_;
 
   base::WeakPtrFactory<ZipAnalyzer> weak_factory_{this};
 };
diff -up chromium-113.0.5672.53/chrome/services/file_util/safe_archive_analyzer.h.me chromium-113.0.5672.53/chrome/services/file_util/safe_archive_analyzer.h
--- chromium-113.0.5672.53/chrome/services/file_util/safe_archive_analyzer.h.me	2023-04-23 18:06:26.476791520 +0200
+++ chromium-113.0.5672.53/chrome/services/file_util/safe_archive_analyzer.h	2023-04-23 18:08:58.594606171 +0200
@@ -6,7 +6,7 @@
 #define CHROME_SERVICES_FILE_UTIL_SAFE_ARCHIVE_ANALYZER_H_
 
 #include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/common/safe_browsing/rar_analyzer.h"
+//#include "chrome/common/safe_browsing/rar_analyzer.h"
 #include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
 #include "mojo/public/cpp/bindings/remote.h"
 
@@ -59,7 +59,7 @@ class SafeArchiveAnalyzer : public chrom
   void Timeout();
 
   safe_browsing::ZipAnalyzer zip_analyzer_;
-  safe_browsing::RarAnalyzer rar_analyzer_;
+//  safe_browsing::RarAnalyzer rar_analyzer_;
 
   // A timer to ensure no archive takes too long to unpack.
   base::OneShotTimer timeout_timer_;
openSUSE Build Service is sponsored by