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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 278 } |
279 | 279 |
280 net::URLRequestContextGetter* | 280 net::URLRequestContextGetter* |
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( | |
289 int render_process_id, | |
290 int render_view_id, | |
291 const GURL& requesting_frame, | |
292 const MIDISysExPermissionCallback& callback) { | |
293 ChromeMIDIPermissionContext* context = | |
294 ChromeMIDIPermissionContextFactory::GetForProfile(this); | |
295 context->RequestMIDISysExPermission(render_process_id, | |
296 render_view_id, | |
297 requesting_frame, | |
298 callback); | |
299 } | |
300 | |
301 net::URLRequestContextGetter* | 288 net::URLRequestContextGetter* |
302 OffTheRecordProfileImpl::GetRequestContextForExtensions() { | 289 OffTheRecordProfileImpl::GetRequestContextForExtensions() { |
303 return io_data_.GetExtensionsRequestContextGetter().get(); | 290 return io_data_.GetExtensionsRequestContextGetter().get(); |
304 } | 291 } |
305 | 292 |
306 net::URLRequestContextGetter* | 293 net::URLRequestContextGetter* |
307 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( | 294 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( |
308 const base::FilePath& partition_path, | 295 const base::FilePath& partition_path, |
309 bool in_memory, | 296 bool in_memory, |
310 content::ProtocolHandlerMap* protocol_handlers) { | 297 content::ProtocolHandlerMap* protocol_handlers) { |
(...skipping 22 matching lines...) Expand all Loading... |
333 #endif | 320 #endif |
334 } | 321 } |
335 return host_content_settings_map_.get(); | 322 return host_content_settings_map_.get(); |
336 } | 323 } |
337 | 324 |
338 content::GeolocationPermissionContext* | 325 content::GeolocationPermissionContext* |
339 OffTheRecordProfileImpl::GetGeolocationPermissionContext() { | 326 OffTheRecordProfileImpl::GetGeolocationPermissionContext() { |
340 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); | 327 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); |
341 } | 328 } |
342 | 329 |
| 330 content::MidiPermissionContext* |
| 331 OffTheRecordProfileImpl::GetMidiPermissionContext() { |
| 332 return ChromeMIDIPermissionContextFactory::GetForProfile(this); |
| 333 } |
| 334 |
343 quota::SpecialStoragePolicy* | 335 quota::SpecialStoragePolicy* |
344 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { | 336 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { |
345 return GetExtensionSpecialStoragePolicy(); | 337 return GetExtensionSpecialStoragePolicy(); |
346 } | 338 } |
347 | 339 |
348 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { | 340 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { |
349 return (profile == this) || (profile == profile_); | 341 return (profile == this) || (profile == profile_); |
350 } | 342 } |
351 | 343 |
352 Time OffTheRecordProfileImpl::GetStartTime() const { | 344 Time OffTheRecordProfileImpl::GetStartTime() const { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 476 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
485 #if defined(OS_CHROMEOS) | 477 #if defined(OS_CHROMEOS) |
486 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 478 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
487 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 479 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
488 g_browser_process->local_state()); | 480 g_browser_process->local_state()); |
489 } | 481 } |
490 #endif // defined(OS_CHROMEOS) | 482 #endif // defined(OS_CHROMEOS) |
491 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 483 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
492 GetPrefs(), g_browser_process->local_state()); | 484 GetPrefs(), g_browser_process->local_state()); |
493 } | 485 } |
OLD | NEW |