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/public/browser/resource_context.h

Issue 61643007: Update keygen to use correct NSS slot on ChromeOS multiprofile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to 238776 Created 7 years 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 <string>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
10 #include "base/supports_user_data.h" 13 #include "base/supports_user_data.h"
11 #include "build/build_config.h" 14 #include "build/build_config.h"
12 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
13 16
14 class GURL; 17 class GURL;
15 18
16 namespace appcache { 19 namespace appcache {
17 class AppCacheService; 20 class AppCacheService;
18 } 21 }
19 22
20 namespace net { 23 namespace net {
21 class ClientCertStore; 24 class ClientCertStore;
22 class HostResolver; 25 class HostResolver;
26 class KeygenHandler;
23 class URLRequestContext; 27 class URLRequestContext;
24 } 28 }
25 29
26 namespace content { 30 namespace content {
27 31
28 // ResourceContext contains the relevant context information required for 32 // ResourceContext contains the relevant context information required for
29 // resource loading. It lives on the IO thread, although it is constructed on 33 // resource loading. It lives on the IO thread, although it is constructed on
30 // the UI thread. It must be destructed on the IO thread. 34 // the UI thread. It must be destructed on the IO thread.
31 class CONTENT_EXPORT ResourceContext : public base::SupportsUserData { 35 class CONTENT_EXPORT ResourceContext : public base::SupportsUserData {
32 public: 36 public:
33 #if defined(OS_IOS) 37 #if defined(OS_IOS)
34 virtual ~ResourceContext() {} 38 virtual ~ResourceContext() {}
35 #else 39 #else
36 ResourceContext(); 40 ResourceContext();
37 virtual ~ResourceContext(); 41 virtual ~ResourceContext();
38 #endif 42 #endif
39 virtual net::HostResolver* GetHostResolver() = 0; 43 virtual net::HostResolver* GetHostResolver() = 0;
40 44
41 // DEPRECATED: This is no longer a valid given isolated apps/sites and 45 // DEPRECATED: This is no longer a valid given isolated apps/sites and
42 // storage partitioning. This getter returns the default context associated 46 // storage partitioning. This getter returns the default context associated
43 // with a BrowsingContext. 47 // with a BrowsingContext.
44 virtual net::URLRequestContext* GetRequestContext() = 0; 48 virtual net::URLRequestContext* GetRequestContext() = 0;
45 49
46 // Get platform ClientCertStore. May return NULL. 50 // Get platform ClientCertStore. May return NULL.
47 virtual scoped_ptr<net::ClientCertStore> CreateClientCertStore(); 51 virtual scoped_ptr<net::ClientCertStore> CreateClientCertStore();
48 52
53 virtual scoped_ptr<net::KeygenHandler> CreateKeygenHandler(
Ryan Sleevi 2013/12/05 00:23:19 Document this function. I had to look this up when
mattm 2013/12/05 04:41:25 Done.
54 uint32 key_size_in_bits,
55 const std::string& challenge_string,
56 const GURL& url,
57 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback);
58
49 // Returns true if microphone access is allowed for |origin|. Used to 59 // Returns true if microphone access is allowed for |origin|. Used to
50 // determine what level of authorization is given to |origin| to access 60 // determine what level of authorization is given to |origin| to access
51 // resource metadata. 61 // resource metadata.
52 virtual bool AllowMicAccess(const GURL& origin) = 0; 62 virtual bool AllowMicAccess(const GURL& origin) = 0;
53 63
54 // Returns true if web camera access is allowed for |origin|. Used to 64 // Returns true if web camera access is allowed for |origin|. Used to
55 // determine what level of authorization is given to |origin| to access 65 // determine what level of authorization is given to |origin| to access
56 // resource metadata. 66 // resource metadata.
57 virtual bool AllowCameraAccess(const GURL& origin) = 0; 67 virtual bool AllowCameraAccess(const GURL& origin) = 0;
58 68
59 // Returns a random salt string that is used for creating media device IDs. 69 // Returns a random salt string that is used for creating media device IDs.
60 // The salt should be stored in the current user profile and should be reset 70 // The salt should be stored in the current user profile and should be reset
61 // if cookies are cleared. Returns an empty string per default. 71 // if cookies are cleared. Returns an empty string per default.
62 // TODO(perkj): Make this method pure virtual when crbug/315022 is fixed. 72 // TODO(perkj): Make this method pure virtual when crbug/315022 is fixed.
63 virtual std::string GetMediaDeviceIDSalt(); 73 virtual std::string GetMediaDeviceIDSalt();
64 }; 74 };
65 75
66 } // namespace content 76 } // namespace content
67 77
68 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ 78 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698