| // Copyright 2025 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module composebox_query.mojom; |
| |
| // Upload status of a file. |
| enum FileUploadStatus { |
| // Not uploaded. |
| kNotUploaded = 0, |
| // File being processed. |
| kProcessing = 1, |
| // Failed validation - Terminal for this file attempt. |
| kValidationFailed = 2, |
| // Request sent to Lens server. |
| kUploadStarted = 3, |
| // Server confirmed successful receipt. |
| kUploadSuccessful = 4, |
| // Server or network error during upload - Terminal for this file attempt. |
| kUploadFailed = 5, |
| // File expired. |
| kUploadExpired = 6, |
| }; |
| |
| // For upload error notifications and metrics. |
| enum FileUploadErrorType { |
| // Unknown. |
| kUnknown = 0, |
| // Browser error before/during request, not covered by validation. |
| kBrowserProcessingError = 1, |
| // Network-level issue (e.g., no connectivity, DNS failure). |
| kNetworkError = 2, |
| // Server returned an error (e.g., 5xx, specific API error). |
| kServerError = 3, |
| // Server rejected due to size after upload attempt - Considered terminal. |
| kServerSizeLimitExceeded = 4, |
| // Upload aborted by user deletion or session end. |
| kAborted = 5, |
| // Image processing error. |
| kImageProcessingError = 6, |
| }; |