| 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/test/base/testing_profile.h" | 5 #include "chrome/test/base/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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 return NULL; | 638 return NULL; |
| 639 } | 639 } |
| 640 | 640 |
| 641 net::URLRequestContextGetter* | 641 net::URLRequestContextGetter* |
| 642 TestingProfile::GetMediaRequestContextForStoragePartition( | 642 TestingProfile::GetMediaRequestContextForStoragePartition( |
| 643 const base::FilePath& partition_path, | 643 const base::FilePath& partition_path, |
| 644 bool in_memory) { | 644 bool in_memory) { |
| 645 return NULL; | 645 return NULL; |
| 646 } | 646 } |
| 647 | 647 |
| 648 void TestingProfile::RequestMIDISysExPermission( |
| 649 int render_process_id, |
| 650 int render_view_id, |
| 651 const GURL& requesting_frame, |
| 652 const MIDISysExPermissionCallback& callback) { |
| 653 // Always reject requests for testing. |
| 654 callback.Run(false); |
| 655 } |
| 656 |
| 648 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { | 657 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { |
| 649 if (!extensions_request_context_.get()) | 658 if (!extensions_request_context_.get()) |
| 650 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); | 659 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); |
| 651 return extensions_request_context_.get(); | 660 return extensions_request_context_.get(); |
| 652 } | 661 } |
| 653 | 662 |
| 654 net::SSLConfigService* TestingProfile::GetSSLConfigService() { | 663 net::SSLConfigService* TestingProfile::GetSSLConfigService() { |
| 655 if (!GetRequestContext()) | 664 if (!GetRequestContext()) |
| 656 return NULL; | 665 return NULL; |
| 657 return GetRequestContext()->GetURLRequestContext()->ssl_config_service(); | 666 return GetRequestContext()->GetURLRequestContext()->ssl_config_service(); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 | 806 |
| 798 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 807 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
| 799 DCHECK(!build_called_); | 808 DCHECK(!build_called_); |
| 800 build_called_ = true; | 809 build_called_ = true; |
| 801 return scoped_ptr<TestingProfile>(new TestingProfile( | 810 return scoped_ptr<TestingProfile>(new TestingProfile( |
| 802 path_, | 811 path_, |
| 803 delegate_, | 812 delegate_, |
| 804 extension_policy_, | 813 extension_policy_, |
| 805 pref_service_.Pass())); | 814 pref_service_.Pass())); |
| 806 } | 815 } |
| OLD | NEW |