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

Side by Side Diff: chrome/browser/net/url_request_context_getter.h

Issue 387055: Always destruct url request context getter on io thread.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « chrome/browser/gtk/options/cookies_view_unittest.cc ('k') | chrome/browser/spellcheck_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NET_URL_REQUEST_CONTEXT_GETTER_H_ 5 #ifndef CHROME_BROWSER_NET_URL_REQUEST_CONTEXT_GETTER_H_
6 #define CHROME_BROWSER_NET_URL_REQUEST_CONTEXT_GETTER_H_ 6 #define CHROME_BROWSER_NET_URL_REQUEST_CONTEXT_GETTER_H_
7 7
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "chrome/browser/chrome_thread.h"
9 10
10 namespace net { 11 namespace net {
11 class CookieStore; 12 class CookieStore;
12 } 13 }
13 14
14 class URLRequestContext; 15 class URLRequestContext;
15 16
16 // Interface for retrieving an URLRequestContext. 17 // Interface for retrieving an URLRequestContext.
17 class URLRequestContextGetter 18 class URLRequestContextGetter
18 : public base::RefCountedThreadSafe<URLRequestContextGetter> { 19 : public base::RefCountedThreadSafe<URLRequestContextGetter,
20 ChromeThread::DeleteOnIOThread> {
19 public: 21 public:
20 virtual URLRequestContext* GetURLRequestContext() = 0; 22 virtual URLRequestContext* GetURLRequestContext() = 0;
21 23
22 // Defaults to GetURLRequestContext()->cookie_store(), but 24 // Defaults to GetURLRequestContext()->cookie_store(), but
23 // implementations can override it. 25 // implementations can override it.
24 virtual net::CookieStore* GetCookieStore(); 26 virtual net::CookieStore* GetCookieStore();
25 27
26 protected: 28 protected:
27 friend class base::RefCountedThreadSafe<URLRequestContextGetter>; 29 friend class ChromeThread;
30 friend class DeleteTask<URLRequestContextGetter>;
28 31
29 virtual ~URLRequestContextGetter() {} 32 virtual ~URLRequestContextGetter() {}
30 }; 33 };
31 34
32 #endif // CHROME_BROWSER_NET_URL_REQUEST_CONTEXT_GETTER_H_ 35 #endif // CHROME_BROWSER_NET_URL_REQUEST_CONTEXT_GETTER_H_
33 36
OLDNEW
« no previous file with comments | « chrome/browser/gtk/options/cookies_view_unittest.cc ('k') | chrome/browser/spellcheck_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698