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

Side by Side Diff: content/public/browser/resource_context.h

Issue 42773002: Get ClientCertStore through ResourceContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for comments #4 and #5 Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
9 #include "base/supports_user_data.h" 10 #include "base/supports_user_data.h"
10 #include "build/build_config.h" 11 #include "build/build_config.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
12 13
13 class GURL; 14 class GURL;
14 15
15 namespace appcache { 16 namespace appcache {
16 class AppCacheService; 17 class AppCacheService;
17 } 18 }
18 19
19 namespace net { 20 namespace net {
21 class ClientCertStore;
20 class HostResolver; 22 class HostResolver;
21 class URLRequestContext; 23 class URLRequestContext;
22 } 24 }
23 25
24 namespace content { 26 namespace content {
25 27
26 // ResourceContext contains the relevant context information required for 28 // ResourceContext contains the relevant context information required for
27 // resource loading. It lives on the IO thread, although it is constructed on 29 // resource loading. It lives on the IO thread, although it is constructed on
28 // the UI thread. It must be destructed on the IO thread. 30 // the UI thread. It must be destructed on the IO thread.
29 class CONTENT_EXPORT ResourceContext : public base::SupportsUserData { 31 class CONTENT_EXPORT ResourceContext : public base::SupportsUserData {
30 public: 32 public:
31 #if defined(OS_IOS) 33 #if defined(OS_IOS)
32 virtual ~ResourceContext() {} 34 virtual ~ResourceContext() {}
33 #else 35 #else
34 ResourceContext(); 36 ResourceContext();
35 virtual ~ResourceContext(); 37 virtual ~ResourceContext();
36 #endif 38 #endif
37 virtual net::HostResolver* GetHostResolver() = 0; 39 virtual net::HostResolver* GetHostResolver() = 0;
38 40
39 // DEPRECATED: This is no longer a valid given isolated apps/sites and 41 // DEPRECATED: This is no longer a valid given isolated apps/sites and
40 // storage partitioning. This getter returns the default context associated 42 // storage partitioning. This getter returns the default context associated
41 // with a BrowsingContext. 43 // with a BrowsingContext.
42 virtual net::URLRequestContext* GetRequestContext() = 0; 44 virtual net::URLRequestContext* GetRequestContext() = 0;
43 45
46 // Get platform ClientCertStore. May return NULL.
47 virtual scoped_ptr<net::ClientCertStore> GetClientCertStore();
wtc 2013/10/28 19:41:12 It is strange to see this method returns a scoped_
mattm 2013/10/28 23:56:16 Should be addressed by the name change.
48
44 // Returns true if microphone access is allowed for |origin|. Used to 49 // Returns true if microphone access is allowed for |origin|. Used to
45 // determine what level of authorization is given to |origin| to access 50 // determine what level of authorization is given to |origin| to access
46 // resource metadata. 51 // resource metadata.
47 virtual bool AllowMicAccess(const GURL& origin) = 0; 52 virtual bool AllowMicAccess(const GURL& origin) = 0;
48 53
49 // Returns true if web camera access is allowed for |origin|. Used to 54 // Returns true if web camera access is allowed for |origin|. Used to
50 // determine what level of authorization is given to |origin| to access 55 // determine what level of authorization is given to |origin| to access
51 // resource metadata. 56 // resource metadata.
52 virtual bool AllowCameraAccess(const GURL& origin) = 0; 57 virtual bool AllowCameraAccess(const GURL& origin) = 0;
53 }; 58 };
54 59
55 } // namespace content 60 } // namespace content
56 61
57 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ 62 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698