Extend CookieOptions to include updating last accessed time.

We have too many methods of accessing cookies hanging off of CookieStore
(and CookieMonster). This patch untangles some of the behavioral
differences between the methods by moving the decision about whether or
not a "get" operation updates the last-accessed time to CookieOptions.
This allows us to more cleanly implement the backend of the 'GetAll*'
methods, with the goal of getting rid of them entirely.

BUG=588081
[email protected],[email protected]

Review URL: https://codereview.chromium.org/1713013002

Cr-Commit-Position: refs/heads/master@{#376780}
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index f482e5c..87acb9a 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -153,7 +153,7 @@
   // mark the cookies as having been accessed.
   // The returned cookies are ordered by longest path, then earliest
   // creation date.
-  void GetAllCookiesForURLWithOptionsAsync(
+  void GetCookieListForURLWithOptionsAsync(
       const GURL& url,
       const CookieOptions& options,
       const GetCookieListCallback& callback);
@@ -238,7 +238,7 @@
   class DeleteAllCreatedBetweenForHostTask;
   class DeleteCookieTask;
   class DeleteCanonicalCookieTask;
-  class GetAllCookiesForURLWithOptionsTask;
+  class GetCookieListForURLWithOptionsTask;
   class GetAllCookiesTask;
   class GetCookiesWithOptionsTask;
   class SetAllCookiesTask;
@@ -418,7 +418,7 @@
 
   CookieList GetAllCookies();
 
-  CookieList GetAllCookiesForURLWithOptions(const GURL& url,
+  CookieList GetCookieListForURLWithOptions(const GURL& url,
                                             const CookieOptions& options);
 
   int DeleteAllCreatedBetween(const base::Time& delete_begin,
@@ -496,14 +496,12 @@
 
   void FindCookiesForHostAndDomain(const GURL& url,
                                    const CookieOptions& options,
-                                   bool update_access_time,
                                    std::vector<CanonicalCookie*>* cookies);
 
   void FindCookiesForKey(const std::string& key,
                          const GURL& url,
                          const CookieOptions& options,
                          const base::Time& current,
-                         bool update_access_time,
                          std::vector<CanonicalCookie*>* cookies);
 
   // Delete any cookies that are equivalent to |ecc| (same path, domain, etc).