Explicitly define comparison op.

Defaulted comparisons are C++20-only.

Bug: 1444563
Change-Id: Idd7a43fcd8858803895734d0b57f28a026d812ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4526755
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1143327}
diff --git a/components/password_manager/core/browser/export/password_manager_exporter.cc b/components/password_manager/core/browser/export/password_manager_exporter.cc
index 4bb14ebf..1f0915c 100644
--- a/components/password_manager/core/browser/export/password_manager_exporter.cc
+++ b/components/password_manager/core/browser/export/password_manager_exporter.cc
@@ -4,6 +4,7 @@
 
 #include "components/password_manager/core/browser/export/password_manager_exporter.h"
 
+#include <tuple>
 #include <utility>
 
 #include "base/containers/flat_set.h"
@@ -59,6 +60,11 @@
 
 }  // namespace
 
+bool operator==(const PasswordExportInfo& lhs, const PasswordExportInfo& rhs) {
+  return std::tie(lhs.status, lhs.file_path, lhs.folder_name) ==
+         std::tie(rhs.status, rhs.file_path, rhs.folder_name);
+}
+
 PasswordManagerExporter::PasswordManagerExporter(
     SavedPasswordsPresenter* presenter,
     ProgressCallback on_progress,
diff --git a/components/password_manager/core/browser/export/password_manager_exporter.h b/components/password_manager/core/browser/export/password_manager_exporter.h
index 5c48f6a7..dd6e12d 100644
--- a/components/password_manager/core/browser/export/password_manager_exporter.h
+++ b/components/password_manager/core/browser/export/password_manager_exporter.h
@@ -26,11 +26,10 @@
   std::string file_path;
   // The name of the folder containing the exported file.
   std::string folder_name;
-
-  friend bool operator==(const PasswordExportInfo& lhs,
-                         const PasswordExportInfo& rhs) = default;
 };
 
+bool operator==(const PasswordExportInfo& lhs, const PasswordExportInfo& rhs);
+
 // Controls the exporting of passwords. One instance per export flow.
 // PasswordManagerExporter will perform the export asynchronously as soon as all
 // the required info is available (password list and destination), unless