Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: ios/net/cookies/cookie_store_ios.h

Issue 2623523003: [ios] Removed CookieStoreIOS::set_flush_delay_for_testing. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ios/net/cookies/cookie_store_ios.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_H_ 5 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_H_
6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_H_ 6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Must be called when the state of 74 // Must be called when the state of
75 // |NSHTTPCookieStorage sharedHTTPCookieStorage| changes. 75 // |NSHTTPCookieStorage sharedHTTPCookieStorage| changes.
76 // Affects only those CookieStoreIOS instances that are backed by 76 // Affects only those CookieStoreIOS instances that are backed by
77 // |NSHTTPCookieStorage sharedHTTPCookieStorage|. 77 // |NSHTTPCookieStorage sharedHTTPCookieStorage|.
78 static void NotifySystemCookiesChanged(); 78 static void NotifySystemCookiesChanged();
79 79
80 // Only one cookie store may enable metrics. 80 // Only one cookie store may enable metrics.
81 void SetMetricsEnabled(); 81 void SetMetricsEnabled();
82 82
83 // Sets the delay between flushes. Only used in tests.
84 void set_flush_delay_for_testing(base::TimeDelta delay) {
85 flush_delay_ = delay;
86 }
87
88 // Inherited CookieStore methods. 83 // Inherited CookieStore methods.
89 void SetCookieWithOptionsAsync(const GURL& url, 84 void SetCookieWithOptionsAsync(const GURL& url,
90 const std::string& cookie_line, 85 const std::string& cookie_line,
91 const net::CookieOptions& options, 86 const net::CookieOptions& options,
92 const SetCookiesCallback& callback) override; 87 const SetCookiesCallback& callback) override;
93 void SetCookieWithDetailsAsync(const GURL& url, 88 void SetCookieWithDetailsAsync(const GURL& url,
94 const std::string& name, 89 const std::string& name,
95 const std::string& value, 90 const std::string& value,
96 const std::string& domain, 91 const std::string& domain,
97 const std::string& path, 92 const std::string& path,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Inherited CookieNotificationObserver methods. 162 // Inherited CookieNotificationObserver methods.
168 void OnSystemCookiesChanged() override; 163 void OnSystemCookiesChanged() override;
169 164
170 void DeleteCookiesWithFilter(const CookieFilterFunction& filter, 165 void DeleteCookiesWithFilter(const CookieFilterFunction& filter,
171 const DeleteCallback& callback); 166 const DeleteCallback& callback);
172 167
173 std::unique_ptr<net::CookieMonster> cookie_monster_; 168 std::unique_ptr<net::CookieMonster> cookie_monster_;
174 base::scoped_nsobject<NSHTTPCookieStorage> system_store_; 169 base::scoped_nsobject<NSHTTPCookieStorage> system_store_;
175 std::unique_ptr<CookieCreationTimeManager> creation_time_manager_; 170 std::unique_ptr<CookieCreationTimeManager> creation_time_manager_;
176 bool metrics_enabled_; 171 bool metrics_enabled_;
177 base::TimeDelta flush_delay_;
178 base::CancelableClosure flush_closure_; 172 base::CancelableClosure flush_closure_;
179 173
180 SynchronizationState synchronization_state_; 174 SynchronizationState synchronization_state_;
181 // Tasks received when SYNCHRONIZING are queued and run when SYNCHRONIZED. 175 // Tasks received when SYNCHRONIZING are queued and run when SYNCHRONIZED.
182 std::vector<base::Closure> tasks_pending_synchronization_; 176 std::vector<base::Closure> tasks_pending_synchronization_;
183 177
184 base::ThreadChecker thread_checker_; 178 base::ThreadChecker thread_checker_;
185 179
186 // Cookie notification methods. 180 // Cookie notification methods.
187 // The cookie cache is updated from both the system store and the 181 // The cookie cache is updated from both the system store and the
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 hook_map_; 289 hook_map_;
296 290
297 base::WeakPtrFactory<CookieStoreIOS> weak_factory_; 291 base::WeakPtrFactory<CookieStoreIOS> weak_factory_;
298 292
299 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOS); 293 DISALLOW_COPY_AND_ASSIGN(CookieStoreIOS);
300 }; 294 };
301 295
302 } // namespace net 296 } // namespace net
303 297
304 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_H_ 298 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_H_
OLDNEW
« no previous file with comments | « no previous file | ios/net/cookies/cookie_store_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698