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 "chrome/browser/profiles/off_the_record_profile_impl.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_impl.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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition( | 281 OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition( |
282 const base::FilePath& partition_path, | 282 const base::FilePath& partition_path, |
283 bool in_memory) { | 283 bool in_memory) { |
284 return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory) | 284 return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory) |
285 .get(); | 285 .get(); |
286 } | 286 } |
287 | 287 |
288 void OffTheRecordProfileImpl::RequestMIDISysExPermission( | 288 void OffTheRecordProfileImpl::RequestMIDISysExPermission( |
289 int render_process_id, | 289 int render_process_id, |
290 int render_view_id, | 290 int render_view_id, |
| 291 int bridge_id, |
291 const GURL& requesting_frame, | 292 const GURL& requesting_frame, |
292 const MIDISysExPermissionCallback& callback) { | 293 const MIDISysExPermissionCallback& callback) { |
293 ChromeMIDIPermissionContext* context = | 294 ChromeMIDIPermissionContext* context = |
294 ChromeMIDIPermissionContextFactory::GetForProfile(this); | 295 ChromeMIDIPermissionContextFactory::GetForProfile(this); |
295 context->RequestMIDISysExPermission(render_process_id, | 296 context->RequestMIDISysExPermission(render_process_id, |
296 render_view_id, | 297 render_view_id, |
| 298 bridge_id, |
297 requesting_frame, | 299 requesting_frame, |
298 callback); | 300 callback); |
299 } | 301 } |
300 | 302 |
| 303 void OffTheRecordProfileImpl::CancelMIDISysExPermissionRequest( |
| 304 int render_process_id, |
| 305 int render_view_id, |
| 306 int bridge_id, |
| 307 const GURL& requesting_frame) { |
| 308 ChromeMIDIPermissionContext* context = |
| 309 ChromeMIDIPermissionContextFactory::GetForProfile(this); |
| 310 context->CancelMIDISysExPermissionRequest( |
| 311 render_process_id, render_view_id, bridge_id, requesting_frame); |
| 312 } |
| 313 |
301 net::URLRequestContextGetter* | 314 net::URLRequestContextGetter* |
302 OffTheRecordProfileImpl::GetRequestContextForExtensions() { | 315 OffTheRecordProfileImpl::GetRequestContextForExtensions() { |
303 return io_data_.GetExtensionsRequestContextGetter().get(); | 316 return io_data_.GetExtensionsRequestContextGetter().get(); |
304 } | 317 } |
305 | 318 |
306 net::URLRequestContextGetter* | 319 net::URLRequestContextGetter* |
307 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( | 320 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( |
308 const base::FilePath& partition_path, | 321 const base::FilePath& partition_path, |
309 bool in_memory, | 322 bool in_memory, |
310 content::ProtocolHandlerMap* protocol_handlers) { | 323 content::ProtocolHandlerMap* protocol_handlers) { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 497 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
485 #if defined(OS_CHROMEOS) | 498 #if defined(OS_CHROMEOS) |
486 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 499 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
487 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 500 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
488 g_browser_process->local_state()); | 501 g_browser_process->local_state()); |
489 } | 502 } |
490 #endif // defined(OS_CHROMEOS) | 503 #endif // defined(OS_CHROMEOS) |
491 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 504 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
492 GetPrefs(), g_browser_process->local_state()); | 505 GetPrefs(), g_browser_process->local_state()); |
493 } | 506 } |
OLD | NEW |