| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 callback.Run(false); | 108 callback.Run(false); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void TestBrowserContext::CancelMIDISysExPermissionRequest( | 111 void TestBrowserContext::CancelMIDISysExPermissionRequest( |
| 112 int render_process_id, | 112 int render_process_id, |
| 113 int render_view_id, | 113 int render_view_id, |
| 114 int bridge_id, | 114 int bridge_id, |
| 115 const GURL& requesting_frame) { | 115 const GURL& requesting_frame) { |
| 116 } | 116 } |
| 117 | 117 |
| 118 void TestBrowserContext::RequestProtectedMediaIdentifierPermission( |
| 119 int render_process_id, |
| 120 int render_view_id, |
| 121 int bridge_id, |
| 122 int group_id, |
| 123 const GURL& requesting_frame, |
| 124 const ProtectedMediaIdentifierPermissionCallback& callback) { |
| 125 // Always reject requests for testing. |
| 126 callback.Run(false); |
| 127 } |
| 128 |
| 129 void TestBrowserContext::CancelProtectedMediaIdentifierPermissionRequests( |
| 130 int group_id) { |
| 131 } |
| 132 |
| 118 ResourceContext* TestBrowserContext::GetResourceContext() { | 133 ResourceContext* TestBrowserContext::GetResourceContext() { |
| 119 if (!resource_context_) | 134 if (!resource_context_) |
| 120 resource_context_.reset(new MockResourceContext( | 135 resource_context_.reset(new MockResourceContext( |
| 121 GetRequestContext()->GetURLRequestContext())); | 136 GetRequestContext()->GetURLRequestContext())); |
| 122 return resource_context_.get(); | 137 return resource_context_.get(); |
| 123 } | 138 } |
| 124 | 139 |
| 125 GeolocationPermissionContext* | 140 GeolocationPermissionContext* |
| 126 TestBrowserContext::GetGeolocationPermissionContext() { | 141 TestBrowserContext::GetGeolocationPermissionContext() { |
| 127 return NULL; | 142 return NULL; |
| 128 } | 143 } |
| 129 | 144 |
| 130 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() { | 145 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() { |
| 131 return special_storage_policy_.get(); | 146 return special_storage_policy_.get(); |
| 132 } | 147 } |
| 133 | 148 |
| 134 } // namespace content | 149 } // namespace content |
| OLD | NEW |