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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "content/public/browser/host_zoom_map.h" | 48 #include "content/public/browser/host_zoom_map.h" |
49 #include "content/public/browser/render_process_host.h" | 49 #include "content/public/browser/render_process_host.h" |
50 #include "content/public/browser/storage_partition.h" | 50 #include "content/public/browser/storage_partition.h" |
51 #include "content/public/browser/url_data_source.h" | 51 #include "content/public/browser/url_data_source.h" |
52 #include "content/public/browser/web_contents.h" | 52 #include "content/public/browser/web_contents.h" |
53 #include "extensions/common/extension.h" | 53 #include "extensions/common/extension.h" |
54 #include "net/http/http_server_properties.h" | 54 #include "net/http/http_server_properties.h" |
55 #include "net/http/transport_security_state.h" | 55 #include "net/http/transport_security_state.h" |
56 #include "webkit/browser/database/database_tracker.h" | 56 #include "webkit/browser/database/database_tracker.h" |
57 | 57 |
| 58 #if defined(OS_ANDROID) |
| 59 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
| 60 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" |
| 61 #endif // defined(OS_ANDROID) |
| 62 |
58 #if defined(OS_ANDROID) || defined(OS_IOS) | 63 #if defined(OS_ANDROID) || defined(OS_IOS) |
59 #include "base/prefs/scoped_user_pref_update.h" | 64 #include "base/prefs/scoped_user_pref_update.h" |
60 #include "chrome/browser/prefs/proxy_prefs.h" | 65 #include "chrome/browser/prefs/proxy_prefs.h" |
61 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 66 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
62 | 67 |
63 #if defined(OS_CHROMEOS) | 68 #if defined(OS_CHROMEOS) |
64 #include "chrome/browser/chromeos/preferences.h" | 69 #include "chrome/browser/chromeos/preferences.h" |
65 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 70 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
66 #endif | 71 #endif |
67 | 72 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 int render_process_id, | 319 int render_process_id, |
315 int render_view_id, | 320 int render_view_id, |
316 int bridge_id, | 321 int bridge_id, |
317 const GURL& requesting_frame) { | 322 const GURL& requesting_frame) { |
318 ChromeMIDIPermissionContext* context = | 323 ChromeMIDIPermissionContext* context = |
319 ChromeMIDIPermissionContextFactory::GetForProfile(this); | 324 ChromeMIDIPermissionContextFactory::GetForProfile(this); |
320 context->CancelMIDISysExPermissionRequest( | 325 context->CancelMIDISysExPermissionRequest( |
321 render_process_id, render_view_id, bridge_id, requesting_frame); | 326 render_process_id, render_view_id, bridge_id, requesting_frame); |
322 } | 327 } |
323 | 328 |
| 329 void OffTheRecordProfileImpl::RequestProtectedMediaIdentifierPermission( |
| 330 int render_process_id, |
| 331 int render_view_id, |
| 332 int bridge_id, |
| 333 int group_id, |
| 334 const GURL& requesting_frame, |
| 335 const ProtectedMediaIdentifierPermissionCallback& callback) { |
| 336 #if defined(OS_ANDROID) |
| 337 ProtectedMediaIdentifierPermissionContext* context = |
| 338 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(this); |
| 339 context->RequestProtectedMediaIdentifierPermission(render_process_id, |
| 340 render_view_id, |
| 341 bridge_id, |
| 342 group_id, |
| 343 requesting_frame, |
| 344 callback); |
| 345 #else |
| 346 NOTIMPLEMENTED(); |
| 347 callback.Run(false); |
| 348 #endif // defined(OS_ANDROID) |
| 349 } |
| 350 |
| 351 void OffTheRecordProfileImpl::CancelProtectedMediaIdentifierPermissionRequests( |
| 352 int group_id) { |
| 353 #if defined(OS_ANDROID) |
| 354 ProtectedMediaIdentifierPermissionContext* context = |
| 355 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(this); |
| 356 context->CancelProtectedMediaIdentifierPermissionRequests(group_id); |
| 357 #else |
| 358 NOTIMPLEMENTED(); |
| 359 #endif // defined(OS_ANDROID) |
| 360 } |
| 361 |
324 net::URLRequestContextGetter* | 362 net::URLRequestContextGetter* |
325 OffTheRecordProfileImpl::GetRequestContextForExtensions() { | 363 OffTheRecordProfileImpl::GetRequestContextForExtensions() { |
326 return io_data_.GetExtensionsRequestContextGetter().get(); | 364 return io_data_.GetExtensionsRequestContextGetter().get(); |
327 } | 365 } |
328 | 366 |
329 net::URLRequestContextGetter* | 367 net::URLRequestContextGetter* |
330 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( | 368 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( |
331 const base::FilePath& partition_path, | 369 const base::FilePath& partition_path, |
332 bool in_memory, | 370 bool in_memory, |
333 content::ProtocolHandlerMap* protocol_handlers) { | 371 content::ProtocolHandlerMap* protocol_handlers) { |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 542 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
505 #if defined(OS_CHROMEOS) | 543 #if defined(OS_CHROMEOS) |
506 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 544 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
507 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 545 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
508 g_browser_process->local_state()); | 546 g_browser_process->local_state()); |
509 } | 547 } |
510 #endif // defined(OS_CHROMEOS) | 548 #endif // defined(OS_CHROMEOS) |
511 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 549 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
512 GetPrefs(), g_browser_process->local_state()); | 550 GetPrefs(), g_browser_process->local_state()); |
513 } | 551 } |
OLD | NEW |