| OLD | NEW |
| 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 #include "content/public/test/test_browser_context.h" | 5 #include "content/public/test/test_browser_context.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/test/null_task_runner.h" | 8 #include "base/test/null_task_runner.h" |
| 9 #include "content/public/test/mock_resource_context.h" | 9 #include "content/public/test/mock_resource_context.h" |
| 10 #include "net/url_request/url_request_context.h" | 10 #include "net/url_request/url_request_context.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 return NULL; | 92 return NULL; |
| 93 } | 93 } |
| 94 | 94 |
| 95 net::URLRequestContextGetter* | 95 net::URLRequestContextGetter* |
| 96 TestBrowserContext::GetMediaRequestContextForStoragePartition( | 96 TestBrowserContext::GetMediaRequestContextForStoragePartition( |
| 97 const base::FilePath& partition_path, | 97 const base::FilePath& partition_path, |
| 98 bool in_memory) { | 98 bool in_memory) { |
| 99 return NULL; | 99 return NULL; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void TestBrowserContext::RequestMIDISysExPermission( |
| 103 int render_process_id, |
| 104 int render_view_id, |
| 105 int client_id, |
| 106 const GURL& requesting_frame, |
| 107 const MIDISysExPermissionCallback& callback) { |
| 108 // Always reject requests for testing. |
| 109 callback.Run(render_process_id, render_view_id, client_id, false); |
| 110 } |
| 111 |
| 102 ResourceContext* TestBrowserContext::GetResourceContext() { | 112 ResourceContext* TestBrowserContext::GetResourceContext() { |
| 103 if (!resource_context_) | 113 if (!resource_context_) |
| 104 resource_context_.reset(new MockResourceContext()); | 114 resource_context_.reset(new MockResourceContext()); |
| 105 return resource_context_.get(); | 115 return resource_context_.get(); |
| 106 } | 116 } |
| 107 | 117 |
| 108 GeolocationPermissionContext* | 118 GeolocationPermissionContext* |
| 109 TestBrowserContext::GetGeolocationPermissionContext() { | 119 TestBrowserContext::GetGeolocationPermissionContext() { |
| 110 return NULL; | 120 return NULL; |
| 111 } | 121 } |
| 112 | 122 |
| 113 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() { | 123 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() { |
| 114 return special_storage_policy_.get(); | 124 return special_storage_policy_.get(); |
| 115 } | 125 } |
| 116 | 126 |
| 117 } // namespace content | 127 } // namespace content |
| OLD | NEW |