OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/shell/browser/shell_browser_context.h" | 5 #include "content/shell/browser/shell_browser_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/browser/resource_context.h" | 15 #include "content/public/browser/resource_context.h" |
16 #include "content/public/browser/storage_partition.h" | 16 #include "content/public/browser/storage_partition.h" |
17 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
18 #include "content/shell/browser/shell_download_manager_delegate.h" | 18 #include "content/shell/browser/shell_download_manager_delegate.h" |
19 #include "content/shell/browser/shell_url_request_context_getter.h" | 19 #include "content/shell/browser/shell_url_request_context_getter.h" |
20 #include "content/shell/common/shell_switches.h" | 20 #include "content/shell/common/shell_switches.h" |
| 21 #include "net/base/keygen_handler.h" |
21 | 22 |
22 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
23 #include "base/base_paths_win.h" | 24 #include "base/base_paths_win.h" |
24 #elif defined(OS_LINUX) | 25 #elif defined(OS_LINUX) |
25 #include "base/nix/xdg_util.h" | 26 #include "base/nix/xdg_util.h" |
26 #elif defined(OS_MACOSX) | 27 #elif defined(OS_MACOSX) |
27 #include "base/base_paths_mac.h" | 28 #include "base/base_paths_mac.h" |
28 #endif | 29 #endif |
29 | 30 |
30 namespace content { | 31 namespace content { |
31 | 32 |
32 class ShellBrowserContext::ShellResourceContext : public ResourceContext { | 33 class ShellBrowserContext::ShellResourceContext : public ResourceContext { |
33 public: | 34 public: |
34 ShellResourceContext() : getter_(NULL) {} | 35 ShellResourceContext() : getter_(NULL) {} |
35 virtual ~ShellResourceContext() {} | 36 virtual ~ShellResourceContext() {} |
36 | 37 |
37 // ResourceContext implementation: | 38 // ResourceContext implementation: |
| 39 virtual void CreateKeygenHandler( |
| 40 uint32 key_size_in_bits, |
| 41 const std::string& challenge_string, |
| 42 const GURL& url, |
| 43 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) |
| 44 OVERRIDE { |
| 45 scoped_ptr<net::KeygenHandler> handler( |
| 46 new net::KeygenHandler(key_size_in_bits, challenge_string, url)); |
| 47 callback.Run(handler.Pass()); |
| 48 } |
38 virtual net::HostResolver* GetHostResolver() OVERRIDE { | 49 virtual net::HostResolver* GetHostResolver() OVERRIDE { |
39 CHECK(getter_); | 50 CHECK(getter_); |
40 return getter_->host_resolver(); | 51 return getter_->host_resolver(); |
41 } | 52 } |
42 virtual net::URLRequestContext* GetRequestContext() OVERRIDE { | 53 virtual net::URLRequestContext* GetRequestContext() OVERRIDE { |
43 CHECK(getter_); | 54 CHECK(getter_); |
44 return getter_->GetURLRequestContext(); | 55 return getter_->GetURLRequestContext(); |
45 } | 56 } |
46 virtual bool AllowMicAccess(const GURL& origin) OVERRIDE { | 57 virtual bool AllowMicAccess(const GURL& origin) OVERRIDE { |
47 return false; | 58 return false; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 209 |
199 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 210 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
200 return NULL; | 211 return NULL; |
201 } | 212 } |
202 | 213 |
203 PushMessagingService* ShellBrowserContext::GetPushMessagingService() { | 214 PushMessagingService* ShellBrowserContext::GetPushMessagingService() { |
204 return NULL; | 215 return NULL; |
205 } | 216 } |
206 | 217 |
207 } // namespace content | 218 } // namespace content |
OLD | NEW |