Unnest CanonicalCookie::CookieInclusionStatus

The nesting of CookieInclusionStatus inside CanonicalCookie is a
holdover from when it was just an enum.
There's really no great reason to keep it that way,
so we should unnest it and move it to its own file.

[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]

TBRing reviewers:
boliu: Please review changes to android_webview/
avi: Please review changes to chrome/
droger: Please review changes to component/signin/
alexmos: Please review changes to content/
ajgo: Please review changes to fuchsia/
mrefaat: Please review changes to ios/
agl: Please review changes to net/
blundell: Please review changes to services/

Bug: 1080767
Change-Id: Ieb9570ceeecd9ae3c2025ad46387aaef820995e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203171
Reviewed-by: David Roger <[email protected]>
Reviewed-by: Bo <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Reviewed-by: Lily Chen <[email protected]>
Commit-Queue: Lily Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#770652}
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 0e88cd83..1786308 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -88,7 +88,7 @@
     const std::string& cookie_name,
     const std::string& cookie_domain,
     const std::string& cookie_path,
-    const net::CanonicalCookie::CookieInclusionStatus& status,
+    const net::CookieInclusionStatus& status,
     net::NetLogCaptureMode capture_mode) {
   base::Value dict(base::Value::Type::DICTIONARY);
   dict.SetStringKey("operation", operation);
@@ -617,14 +617,14 @@
     for (CookieStatusList::iterator it = maybe_sent_cookies.begin();
          it != maybe_sent_cookies.end(); ++it) {
       it->status.AddExclusionReason(
-          CanonicalCookie::CookieInclusionStatus::EXCLUDE_USER_PREFERENCES);
+          CookieInclusionStatus::EXCLUDE_USER_PREFERENCES);
     }
   }
   for (const auto& cookie_with_status : cookies_with_status_list) {
-    CanonicalCookie::CookieInclusionStatus status = cookie_with_status.status;
+    CookieInclusionStatus status = cookie_with_status.status;
     if (!can_get_cookies) {
       status.AddExclusionReason(
-          CanonicalCookie::CookieInclusionStatus::EXCLUDE_USER_PREFERENCES);
+          CookieInclusionStatus::EXCLUDE_USER_PREFERENCES);
     }
     maybe_sent_cookies.push_back({cookie_with_status.cookie, status});
   }
@@ -707,7 +707,7 @@
   // it reaches 0 in the callback itself.
   num_cookie_lines_left_ = 1;
   while (headers->EnumerateHeader(&iter, name, &cookie_string)) {
-    CanonicalCookie::CookieInclusionStatus returned_status;
+    CookieInclusionStatus returned_status;
 
     num_cookie_lines_left_++;
 
@@ -723,7 +723,7 @@
     }
     if (cookie && !CanSetCookie(*cookie, &options)) {
       returned_status.AddExclusionReason(
-          CanonicalCookie::CookieInclusionStatus::EXCLUDE_USER_PREFERENCES);
+          CookieInclusionStatus::EXCLUDE_USER_PREFERENCES);
     }
     if (!returned_status.IsInclude()) {
       OnSetCookieResult(options, cookie_to_return, std::move(cookie_string),
@@ -749,7 +749,7 @@
     const CookieOptions& options,
     base::Optional<CanonicalCookie> cookie,
     std::string cookie_string,
-    CanonicalCookie::CookieInclusionStatus status) {
+    CookieInclusionStatus status) {
   if (request_->net_log().IsCapturing()) {
     request_->net_log().AddEvent(
         NetLogEventType::COOKIE_INCLUSION_STATUS,