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

Unified Diff: ios/net/cookies/cookie_store_ios_client.h

Issue 994823004: [iOS] Upstream //ios/net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ios/net/cookies/cookie_store_ios_client.h
diff --git a/ios/net/cookies/cookie_store_ios_client.h b/ios/net/cookies/cookie_store_ios_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..2fb23dcd0cb371790b1b38d32e0ff10d40602e40
--- /dev/null
+++ b/ios/net/cookies/cookie_store_ios_client.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_CLIENT_H_
+#define IOS_NET_COOKIES_COOKIE_STORE_IOS_CLIENT_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/sequenced_task_runner.h"
+
+namespace net {
+
+class CookieStoreIOSClient;
+
+// Setter and getter for the client.
+void SetCookieStoreIOSClient(CookieStoreIOSClient* client);
+CookieStoreIOSClient* GetCookieStoreIOSClient();
+
+// Interface that the embedder of the net layer implements. This class lives on
+// the same thread as the CookieStoreIOS.
+class CookieStoreIOSClient {
+ public:
+ CookieStoreIOSClient();
+ virtual ~CookieStoreIOSClient();
+
+ // Gives the embedder a chance to perform tasks before the cookie storage is
+ // changed.
+ virtual void WillChangeCookieStorage() const;
+
+ // Informs the embedder after the cookie storage has been changed.
+ virtual void DidChangeCookieStorage() const;
+
+ // Returns instance of SequencedTaskRunner used for blocking file I/O.
+ virtual scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CookieStoreIOSClient);
+};
+
+} // namespace net
+
+#endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698