Chromium Code Reviews| Index: content/browser/android/cookie_getter_impl.h |
| diff --git a/content/browser/android/cookie_getter_impl.h b/content/browser/android/cookie_getter_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..10688a7907b30bfd02c2d81bc281b4c55a9f2e4f |
| --- /dev/null |
| +++ b/content/browser/android/cookie_getter_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_COOKIE_GETTER_IMPL_H_ |
| +#define CONTENT_BROWSER_ANDROID_COOKIE_GETTER_IMPL_H_ |
| + |
| +#include <string> |
| + |
| +#include "media/base/android/cookie_getter.h" |
| + |
| +namespace net { |
| +class URLRequestContextGetter; |
| +} |
| + |
| +namespace content { |
| + |
| +// This class implements media::CookieGetter to retrive cookies |
| +// asynchronously on the UI thread. |
| +class CookieGetterImpl : public media::CookieGetter { |
|
scherkus (not reviewing)
2012/09/10 12:19:08
This class should have a WeakPtrFactory object tha
qinmin
2012/09/11 04:50:24
Done. The callback passed from MediaPlayerBridge t
|
| + public: |
| + explicit CookieGetterImpl(net::URLRequestContextGetter* context_getter); |
| + virtual ~CookieGetterImpl(); |
| + |
| + // media::CookieGetter implementation. |
| + // Need to be called on the UI thread. |
|
scherkus (not reviewing)
2012/09/10 12:19:08
s/Need to/Must/
qinmin
2012/09/11 04:50:24
Done.
|
| + virtual void GetCookies( |
| + const std::string& url, const GetCookieCB& callback) OVERRIDE; |
| + |
| + private: |
| + // Helper Methods for posting tasks. |
|
scherkus (not reviewing)
2012/09/10 12:19:08
nit: remove comment (not adding much value)
qinmin
2012/09/11 04:50:24
Done.
|
| + void GetCookiesCallback( |
| + const std::string& cookies, const GetCookieCB& callback); |
| + void RequestCookies(const std::string& url, const GetCookieCB& callback); |
| + void ReturnCookies(const GetCookieCB& callback, const std::string& cookies); |
| + |
| + net::URLRequestContextGetter* context_getter_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(CookieGetterImpl); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_ANDROID_COOKIE_GETTER_IMPL_H_ |