OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/test/testing_profile.h" | 5 #include "chrome/test/testing_profile.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 } | 546 } |
547 | 547 |
548 bool TestingProfile::HasCreatedDownloadManager() const { | 548 bool TestingProfile::HasCreatedDownloadManager() const { |
549 return false; | 549 return false; |
550 } | 550 } |
551 | 551 |
552 net::URLRequestContextGetter* TestingProfile::GetRequestContext() { | 552 net::URLRequestContextGetter* TestingProfile::GetRequestContext() { |
553 return request_context_.get(); | 553 return request_context_.get(); |
554 } | 554 } |
555 | 555 |
556 net::URLRequestContextGetter* TestingProfile::GetRequestContextForPossibleApp( | 556 net::URLRequestContextGetter* TestingProfile::GetRequestContextForRenderProcess( |
557 const Extension* installed_app) { | 557 int renderer_child_id) { |
558 if (installed_app != NULL && installed_app->is_storage_isolated()) | 558 if (extension_service_.get()) { |
559 return GetRequestContextForIsolatedApp(installed_app->id()); | 559 const Extension* installed_app = extension_service_-> |
| 560 GetInstalledAppForRenderer(renderer_child_id); |
| 561 if (installed_app != NULL && installed_app->is_storage_isolated()) |
| 562 return GetRequestContextForIsolatedApp(installed_app->id()); |
| 563 } |
560 | 564 |
561 return GetRequestContext(); | 565 return GetRequestContext(); |
562 } | 566 } |
563 | 567 |
564 void TestingProfile::CreateRequestContext() { | 568 void TestingProfile::CreateRequestContext() { |
565 if (!request_context_) | 569 if (!request_context_) |
566 request_context_ = new TestURLRequestContextGetter(); | 570 request_context_ = new TestURLRequestContextGetter(); |
567 } | 571 } |
568 | 572 |
569 void TestingProfile::ResetRequestContext() { | 573 void TestingProfile::ResetRequestContext() { |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 } | 814 } |
811 | 815 |
812 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) | 816 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) |
813 : original_profile_(profile) {} | 817 : original_profile_(profile) {} |
814 | 818 |
815 DerivedTestingProfile::~DerivedTestingProfile() {} | 819 DerivedTestingProfile::~DerivedTestingProfile() {} |
816 | 820 |
817 ProfileId DerivedTestingProfile::GetRuntimeId() { | 821 ProfileId DerivedTestingProfile::GetRuntimeId() { |
818 return original_profile_->GetRuntimeId(); | 822 return original_profile_->GetRuntimeId(); |
819 } | 823 } |
OLD | NEW |