Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_BASE_ANDROID_COOKIES_RETRIEVER_H_ | |
| 6 #define MEDIA_BASE_ANDROID_COOKIES_RETRIEVER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 | |
| 12 namespace media { | |
| 13 | |
| 14 // 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.
| |
| 15 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.
| |
| 16 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
| |
| 17 public: | |
| 18 typedef base::Callback<void(std::string)> GetCookieCB; | |
| 19 | |
| 20 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.
| |
| 21 | |
| 22 // 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.
| |
| 23 // 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.
| |
| 24 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.
| |
| 25 const GetCookieCB& callback) = 0; | |
| 26 }; | |
| 27 | |
| 28 } // namespace media | |
| 29 | |
| 30 #endif // MEDIA_BASE_ANDROID_COOKIES_RETRIEVER_H_ | |
| OLD | NEW |