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

Side by Side Diff: content/browser/android/cookie_getter_impl.h

Issue 12595005: Parsing filesystem url before giving it to media player (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase change Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/android/cookie_getter_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 CONTENT_BROWSER_ANDROID_COOKIE_GETTER_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_COOKIE_GETTER_IMPL_H_
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/synchronization/waitable_event.h"
13 #include "media/base/android/cookie_getter.h"
14 #include "net/cookies/canonical_cookie.h"
15
16 namespace net {
17 class URLRequestContextGetter;
18 }
19
20 namespace content {
21
22 class BrowserContext;
23 class ResourceContext;
24
25 // This class implements media::CookieGetter to retrive cookies
26 // asynchronously on the UI thread.
27 class CookieGetterImpl : public media::CookieGetter {
28 public:
29 // Construct a CookieGetterImpl by passing the BrowserContext reference
30 // and renderer_id to retrieve the CookieStore later.
31 CookieGetterImpl(
32 BrowserContext* browser_context, int renderer_id, int routing_id);
33 virtual ~CookieGetterImpl();
34
35 // media::CookieGetter implementation.
36 // Must be called on the UI thread.
37 virtual void GetCookies(const std::string& url,
38 const std::string& first_party_for_cookies,
39 const GetCookieCB& callback) OVERRIDE;
40
41 private:
42 // Called when GetCookies() finishes.
43 void GetCookiesCallback(
44 const GetCookieCB& callback, const std::string& cookies);
45
46 // BrowserContext to retrieve URLRequestContext and ResourceContext.
47 BrowserContext* browser_context_;
48
49 // Used to post tasks.
50 base::WeakPtrFactory<CookieGetterImpl> weak_this_;
51
52 // Render process id, used to check whether the process can access cookies.
53 int renderer_id_;
54
55 // Routing id for the render view, used to check tab specific cookie policy.
56 int routing_id_;
57
58 DISALLOW_COPY_AND_ASSIGN(CookieGetterImpl);
59 };
60
61 } // namespace content
62
63 #endif // CONTENT_BROWSER_ANDROID_COOKIE_GETTER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/cookie_getter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698