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

Unified Diff: content/browser/android/cookies_retriever_impl.h

Issue 10919075: Move android mediaplayer from render process to browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing comments Created 8 years, 3 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: content/browser/android/cookies_retriever_impl.h
diff --git a/content/browser/android/cookies_retriever_impl.h b/content/browser/android/cookies_retriever_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b32be6d441d92d2ca6e0ff0bbedd31d7ac45315
--- /dev/null
+++ b/content/browser/android/cookies_retriever_impl.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2012 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 CONTENT_BROWSER_ANDROID_COOKIES_RETRIEVER_IMPL_H_
+#define CONTENT_BROWSER_ANDROID_COOKIES_RETRIEVER_IMPL_H_
+
+#include <string>
+
+#include "media/base/android/cookies_retriever.h"
+
+namespace net {
+class URLRequestContextGetter;
+}
+
+namespace content {
+
+// This class implements media::CookiesRetriever to retrive cookies
+// asynchronously on the UI thread.
+class CookiesRetrieverImpl : public media::CookiesRetriever {
+ public:
+ explicit CookiesRetrieverImpl(net::URLRequestContextGetter* context_getter);
+ virtual ~CookiesRetrieverImpl();
+
+ // Need to be called on the UI thread.
scherkus (not reviewing) 2012/09/07 13:17:35 this should note that this is "media::CookiesRetri
qinmin 2012/09/07 22:48:27 Done.
+ virtual void GetCookiesAsync(std::string url,
scherkus (not reviewing) 2012/09/07 13:17:35 nit: incorrect indent style -- param should go on
qinmin 2012/09/07 22:48:27 Done.
+ const media::CookiesRetriever::GetCookieCB& callback) OVERRIDE;
+
+ // Helper Methods for posting tasks.
+ void RequestCookies();
scherkus (not reviewing) 2012/09/07 13:17:35 move all these to private
qinmin 2012/09/07 22:48:27 Done.
+ void ReturnCookies(const std::string& cookies);
+ void GetCookiesCallback(const std::string& cookies);
+
+ private:
+ std::string url_;
+ net::URLRequestContextGetter* context_getter_;
+ media::CookiesRetriever::GetCookieCB get_cookies_cb_;
+
+ DISALLOW_COPY_AND_ASSIGN(CookiesRetrieverImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_COOKIES_RETRIEVER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698