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/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // non-persistent context using the RPH's id. | 274 // non-persistent context using the RPH's id. |
275 std::string id("guest-"); | 275 std::string id("guest-"); |
276 id.append(base::IntToString(renderer_child_id)); | 276 id.append(base::IntToString(renderer_child_id)); |
277 return GetRequestContextForIsolatedApp(id); | 277 return GetRequestContextForIsolatedApp(id); |
278 } | 278 } |
279 | 279 |
280 return GetRequestContext(); | 280 return GetRequestContext(); |
281 } | 281 } |
282 | 282 |
283 net::URLRequestContextGetter* | 283 net::URLRequestContextGetter* |
284 OffTheRecordProfileImpl::GetRequestContextForMedia() { | 284 OffTheRecordProfileImpl::GetDefaultRequestContextForMedia() { |
285 // In OTR mode, media request context is the same as the original one. | 285 // In OTR mode, media request context is the same as the original one. |
286 return io_data_.GetMainRequestContextGetter(); | 286 return GetRequestContext(); |
287 } | 287 } |
288 | 288 |
289 net::URLRequestContextGetter* | 289 net::URLRequestContextGetter* |
| 290 OffTheRecordProfileImpl::GetRequestContextForMedia(int renderer_child_id) { |
| 291 // In OTR mode, media request context is the same as the original one. |
| 292 return GetRequestContextForRenderProcess(renderer_child_id); |
| 293 } |
| 294 |
| 295 net::URLRequestContextGetter* |
290 OffTheRecordProfileImpl::GetRequestContextForExtensions() { | 296 OffTheRecordProfileImpl::GetRequestContextForExtensions() { |
291 return io_data_.GetExtensionsRequestContextGetter(); | 297 return io_data_.GetExtensionsRequestContextGetter(); |
292 } | 298 } |
293 | 299 |
294 net::URLRequestContextGetter* | 300 net::URLRequestContextGetter* |
295 OffTheRecordProfileImpl::GetRequestContextForIsolatedApp( | 301 OffTheRecordProfileImpl::GetRequestContextForIsolatedApp( |
296 const std::string& app_id) { | 302 const std::string& app_id) { |
297 return io_data_.GetIsolatedAppRequestContextGetter(app_id); | 303 return io_data_.GetIsolatedAppRequestContextGetter(app_id); |
298 } | 304 } |
299 | 305 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 if (!profile) | 476 if (!profile) |
471 profile = new OffTheRecordProfileImpl(this); | 477 profile = new OffTheRecordProfileImpl(this); |
472 profile->Init(); | 478 profile->Init(); |
473 return profile; | 479 return profile; |
474 } | 480 } |
475 | 481 |
476 base::Callback<ChromeURLDataManagerBackend*(void)> | 482 base::Callback<ChromeURLDataManagerBackend*(void)> |
477 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 483 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
478 return io_data_.GetChromeURLDataManagerBackendGetter(); | 484 return io_data_.GetChromeURLDataManagerBackendGetter(); |
479 } | 485 } |
OLD | NEW |