| 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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 net::URLRequestContextGetter* | 693 net::URLRequestContextGetter* |
| 694 TestingProfile::GetMediaRequestContextForStoragePartition( | 694 TestingProfile::GetMediaRequestContextForStoragePartition( |
| 695 const base::FilePath& partition_path, | 695 const base::FilePath& partition_path, |
| 696 bool in_memory) { | 696 bool in_memory) { |
| 697 return NULL; | 697 return NULL; |
| 698 } | 698 } |
| 699 | 699 |
| 700 void TestingProfile::RequestMIDISysExPermission( | 700 void TestingProfile::RequestMIDISysExPermission( |
| 701 int render_process_id, | 701 int render_process_id, |
| 702 int render_view_id, | 702 int render_view_id, |
| 703 int bridge_id, |
| 703 const GURL& requesting_frame, | 704 const GURL& requesting_frame, |
| 704 const MIDISysExPermissionCallback& callback) { | 705 const MIDISysExPermissionCallback& callback) { |
| 705 // Always reject requests for testing. | 706 // Always reject requests for testing. |
| 706 callback.Run(false); | 707 callback.Run(false); |
| 707 } | 708 } |
| 708 | 709 |
| 710 void TestingProfile::CancelMIDISysExPermissionRequest( |
| 711 int render_process_id, |
| 712 int render_view_id, |
| 713 int bridge_id, |
| 714 const GURL& requesting_frame) { |
| 715 } |
| 716 |
| 709 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { | 717 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { |
| 710 if (!extensions_request_context_.get()) | 718 if (!extensions_request_context_.get()) |
| 711 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); | 719 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); |
| 712 return extensions_request_context_.get(); | 720 return extensions_request_context_.get(); |
| 713 } | 721 } |
| 714 | 722 |
| 715 net::SSLConfigService* TestingProfile::GetSSLConfigService() { | 723 net::SSLConfigService* TestingProfile::GetSSLConfigService() { |
| 716 if (!GetRequestContext()) | 724 if (!GetRequestContext()) |
| 717 return NULL; | 725 return NULL; |
| 718 return GetRequestContext()->GetURLRequestContext()->ssl_config_service(); | 726 return GetRequestContext()->GetURLRequestContext()->ssl_config_service(); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 | 898 |
| 891 return scoped_ptr<TestingProfile>(new TestingProfile( | 899 return scoped_ptr<TestingProfile>(new TestingProfile( |
| 892 path_, | 900 path_, |
| 893 delegate_, | 901 delegate_, |
| 894 extension_policy_, | 902 extension_policy_, |
| 895 pref_service_.Pass(), | 903 pref_service_.Pass(), |
| 896 incognito_, | 904 incognito_, |
| 897 managed_user_id_, | 905 managed_user_id_, |
| 898 testing_factories_)); | 906 testing_factories_)); |
| 899 } | 907 } |
| OLD | NEW |