[go: nahoru, domu]

DLP: Support Crostini & PluginVm as DataTransfer endpoints

- Removed EndpointType::kGuestOs which was used to refer
to both; Crostini and PluginVm.
- Added more granular endpoint types; kCrostini, and
kPluginVm, kBorealis, and kUnknownVm.

Bug: 1103217
Change-Id: I23020d8937a47bc649b5bae45ebacc80214165a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577209
Commit-Queue: Aya Elsayed <ayaelattar@chromium.org>
Reviewed-by: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836043}
diff --git a/ui/base/data_transfer_policy/data_transfer_endpoint.h b/ui/base/data_transfer_policy/data_transfer_endpoint.h
index 72c7011..64332c4 100644
--- a/ui/base/data_transfer_policy/data_transfer_endpoint.h
+++ b/ui/base/data_transfer_policy/data_transfer_endpoint.h
@@ -18,16 +18,16 @@
 enum class EndpointType {
   kDefault = 0,  // This type shouldn't be used if any of the following types is
                  // a better match.
-#if BUILDFLAG(IS_CHROMEOS_ASH) || (OS_LINUX) || (OS_FUCHSIA)
-  kGuestOs = 1,  // Guest OS: PluginVM, Crostini.
-#endif           // BUILDFLAG(IS_CHROMEOS_ASH) || (OS_LINUX) || (OS_FUCHSIA)
-#if BUILDFLAG(IS_CHROMEOS_ASH)
-  kArc = 2,               // ARC.
-#endif                    // BUILDFLAG(IS_CHROMEOS_ASH)
-  kUrl = 3,               // Website URL e.g. www.example.com.
-  kClipboardHistory = 4,  // Clipboard History UI has privileged access to any
+  kUrl = 1,      // Website URL e.g. www.example.com.
+  kClipboardHistory = 2,  // Clipboard History UI has privileged access to any
                           // clipboard data.
-  kMaxValue = kClipboardHistory
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  kUnknownVm = 3,  // The VM type is not identified.
+  kArc = 4,        // ARC.
+  kBorealis = 5,   // Borealis OS.
+  kCrostini = 6,   // Crostini.
+  kPluginVm = 7    // Plugin VM App.
+#endif             // BUILDFLAG(IS_CHROMEOS_ASH)
 };
 
 // DataTransferEndpoint represents: