Chromium Code Reviews| Index: media/base/android/cookies_retriever.h |
| diff --git a/media/base/android/cookies_retriever.h b/media/base/android/cookies_retriever.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..afdaed8edc106c62ee4c2b5084d438ea5ad0f555 |
| --- /dev/null |
| +++ b/media/base/android/cookies_retriever.h |
| @@ -0,0 +1,30 @@ |
| +// 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 MEDIA_BASE_ANDROID_COOKIES_RETRIEVER_H_ |
| +#define MEDIA_BASE_ANDROID_COOKIES_RETRIEVER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/callback.h" |
| + |
| +namespace media { |
| + |
| +// Class for asynchronously retrieving the cookies for a given url. |
|
scherkus (not reviewing)
2012/09/07 13:17:35
s/url/URL
qinmin
2012/09/07 22:48:27
Done.
|
| +class CookiesRetriever : |
|
scherkus (not reviewing)
2012/09/07 13:17:35
naming suggestions: you have a mismatch between th
qinmin
2012/09/07 22:48:27
Done.
|
| + public base::RefCountedThreadSafe<CookiesRetriever>{ |
|
scherkus (not reviewing)
2012/09/07 13:17:35
why does this need to be refcounted? would weak po
qinmin
2012/09/07 22:48:27
This class can run on multiple threads, and it is
|
| + public: |
| + typedef base::Callback<void(std::string)> GetCookieCB; |
| + |
| + virtual ~CookiesRetriever() {}; |
|
scherkus (not reviewing)
2012/09/07 13:17:35
please move dtor impl into separate .cc
qinmin
2012/09/07 22:48:27
Done.
|
| + |
| + // Method for getting the cookies for a given url. The callback takes place |
|
scherkus (not reviewing)
2012/09/07 13:17:35
s/url/URL
qinmin
2012/09/07 22:48:27
Done.
|
| + // on the same thread where this function gets called. |
|
scherkus (not reviewing)
2012/09/07 13:17:35
reword suggestion -- how about:
"The callback is
qinmin
2012/09/07 22:48:27
Done.
|
| + virtual void GetCookiesAsync(std::string url, |
|
scherkus (not reviewing)
2012/09/07 13:17:35
nit: fix indent
scherkus (not reviewing)
2012/09/07 13:17:35
s/Async// -- there's a callback involved, no need
qinmin
2012/09/07 22:48:27
Done.
qinmin
2012/09/07 22:48:27
Done.
|
| + const GetCookieCB& callback) = 0; |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_BASE_ANDROID_COOKIES_RETRIEVER_H_ |