Change signature of GetCookieListCallback to include list of excluded cookies

Added CookieWithStatus and CookieStatusList typedefs to clean things up a little

TBRing reviewers:
jochen: Mostly mechanical changes all over the place. render_frame_message_filter.cc has a helper function that might be interesting

Bug: 856777
Change-Id: Icd8d4348623a602540cf5aca2865e190359d379d
Reviewed-on: https://chromium-review.googlesource.com/c/1416151
Reviewed-by: Jochen Eisinger <[email protected]>
Reviewed-by: Richard Coles <[email protected]>
Reviewed-by: Matt Menke <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Reviewed-by: Elly Fong-Jones <[email protected]>
Commit-Queue: Aaron Tagliaboschi <[email protected]>
Cr-Commit-Position: refs/heads/master@{#625977}
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index 1d64f00..4fe090c 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -122,6 +122,15 @@
     std::move(callback).Run(result);
 }
 
+template <typename T, typename U>
+void MaybeRunCookieCallback(
+    base::OnceCallback<void(const T&, const U&)> callback,
+    const T& first,
+    const U& second) {
+  if (callback)
+    std::move(callback).Run(first, second);
+}
+
 template <typename T>
 void MaybeRunCookieCallback(base::OnceCallback<void(T)> callback,
                             const T& result) {
@@ -653,7 +662,7 @@
   for (auto* cookie_ptr : cookie_ptrs)
     cookie_list.push_back(*cookie_ptr);
 
-  MaybeRunCookieCallback(std::move(callback), cookie_list);
+  MaybeRunCookieCallback(std::move(callback), cookie_list, CookieStatusList());
 }
 
 void CookieMonster::GetCookieListWithOptions(const GURL& url,
@@ -662,6 +671,7 @@
   DCHECK(thread_checker_.CalledOnValidThread());
 
   CookieList cookies;
+  CookieStatusList excluded_cookies;
   if (HasCookieableScheme(url)) {
     std::vector<CanonicalCookie*> cookie_ptrs;
     FindCookiesForHostAndDomain(url, options, &cookie_ptrs);
@@ -672,7 +682,7 @@
          it != cookie_ptrs.end(); it++)
       cookies.push_back(**it);
   }
-  MaybeRunCookieCallback(std::move(callback), cookies);
+  MaybeRunCookieCallback(std::move(callback), cookies, excluded_cookies);
 }
 
 void CookieMonster::DeleteAllCreatedInTimeRange(const TimeRange& creation_range,