Add network annotation for CustomizationWallpaperDownloader.

Add network annotation for CustomizationWallpaperDownloader and remove
the MISSING_TRAFFIC_ANNOTATION tag.

Bug: 833390
Test: Ran auditor.py locally on target = "chromeos" build.

Change-Id: I338ffd9e7328a59c59a8e15f4b400d714bb219b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3223516
Reviewed-by: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Ramya Gopalan <ramyagopalan@google.com>
Cr-Commit-Position: refs/heads/main@{#935573}
diff --git a/chrome/browser/ash/customization/customization_document.cc b/chrome/browser/ash/customization/customization_document.cc
index d9386f8..bc65a407 100644
--- a/chrome/browser/ash/customization/customization_document.cc
+++ b/chrome/browser/ash/customization/customization_document.cc
@@ -101,6 +101,31 @@
 // Empty customization document that doesn't customize anything.
 const char kEmptyServicesCustomizationManifest[] = "{ \"version\": \"1.0\" }";
 
+constexpr net::NetworkTrafficAnnotationTag kCustomizationDocumentNetworkTag =
+    net::DefineNetworkTrafficAnnotation("customization_document",
+                                        R"(
+        semantics {
+          sender: "Customization document"
+          description:
+            "Get OEM customization manifest from OEM specific URLs that "
+            "provide custom configuration locales, wallpaper etc."
+          trigger:
+            "Triggered on OOBE after user accepts EULA and everytime the "
+            "device boots in. Expected to run only once at OOBE. If the "
+            "network request fails, retried each boot until it succeeds."
+          data: "None."
+          destination: GOOGLE_OWNED_SERVICE
+        }
+        policy {
+         cookies_allowed: NO
+         setting:
+           "This feature is set by OEMs and can be overridden by users."
+         policy_exception_justification:
+           "This request is made based on OEM customization and does not "
+           "send/store any sensitive data."
+         }
+        })");
+
 struct CustomizationDocumentTestOverride {
   ServicesCustomizationDocument* customization_document = nullptr;
   scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory;
@@ -587,8 +612,8 @@
   request->credentials_mode = network::mojom::CredentialsMode::kOmit;
   request->headers.SetHeader("Accept", "application/json");
 
-  url_loader_ = network::SimpleURLLoader::Create(std::move(request),
-                                                 NO_TRAFFIC_ANNOTATION_YET);
+  url_loader_ = network::SimpleURLLoader::Create(
+      std::move(request), kCustomizationDocumentNetworkTag);
 
   url_loader_->DownloadToStringOfUnboundedSizeUntilCrashAndDie(
       g_test_overrides ? g_test_overrides->url_loader_factory.get()
diff --git a/chrome/browser/ash/customization/customization_wallpaper_downloader.cc b/chrome/browser/ash/customization/customization_wallpaper_downloader.cc
index c4155b8..e855515 100644
--- a/chrome/browser/ash/customization/customization_wallpaper_downloader.cc
+++ b/chrome/browser/ash/customization/customization_wallpaper_downloader.cc
@@ -32,6 +32,35 @@
 // longer than maximum (kMaxRetrySleepSeconds) it is set to the maximum.
 const double kMaxRetrySleepSeconds = 6 * 3600;  // 6 hours
 
+constexpr net::NetworkTrafficAnnotationTag
+    kCustomizationWallPaperDownloaderNetworkTag =
+        net::DefineNetworkTrafficAnnotation(
+            "customization_wallpaper_downloader",
+            R"(
+        semantics {
+          sender: "Customization wallpaper"
+          description:
+            "Download wallpaper from OEM custom url to the wallpaper directory "
+            "during OOBE. Admin/user can override the OEM wallpaper to have a "
+            "custom wallpaper. If the admin/user set a custom wallpaper, after "
+            "user sign in, the user will see their preferred wallpaper."
+          trigger:
+            "Triggered to get the OEM's custom wallpaper on device bootup."
+            "The downloaded custom wallpaper is stored until powerwash."
+          data: "None."
+          destination: WEBSITE
+        }
+        policy {
+         cookies_allowed: NO
+         setting:
+           "This feature is set by OEMs and can be overridden by users "
+           "after sign in."
+         policy_exception_justification:
+           "This request is made based on OEM customization and does not "
+           "send/store any sensitive data."
+         }
+        })");
+
 void CreateWallpaperDirectory(const base::FilePath& wallpaper_dir,
                               bool* success) {
   DCHECK(success);
@@ -91,9 +120,8 @@
   resource_request->load_flags =
       net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE;
   resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit;
-  // TODO(crbug.com/833390): Add a real traffic annotation here.
-  simple_loader_ = network::SimpleURLLoader::Create(std::move(resource_request),
-                                                    MISSING_TRAFFIC_ANNOTATION);
+  simple_loader_ = network::SimpleURLLoader::Create(
+      std::move(resource_request), kCustomizationWallPaperDownloaderNetworkTag);
 
   SystemNetworkContextManager* system_network_context_manager =
       g_browser_process->system_network_context_manager();