| 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 ExtensionService* extension_service = GetExtensionService(); | 661 ExtensionService* extension_service = GetExtensionService(); |
| 662 if (extension_service) | 662 if (extension_service) |
| 663 host_content_settings_map_->RegisterExtensionService(extension_service); | 663 host_content_settings_map_->RegisterExtensionService(extension_service); |
| 664 #endif | 664 #endif |
| 665 } | 665 } |
| 666 return host_content_settings_map_.get(); | 666 return host_content_settings_map_.get(); |
| 667 } | 667 } |
| 668 | 668 |
| 669 content::GeolocationPermissionContext* | 669 content::GeolocationPermissionContext* |
| 670 TestingProfile::GetGeolocationPermissionContext() { | 670 TestingProfile::GetGeolocationPermissionContext() { |
| 671 if (!geolocation_permission_context_.get()) { | 671 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); |
| 672 geolocation_permission_context_ = | |
| 673 ChromeGeolocationPermissionContextFactory::Create(this); | |
| 674 } | |
| 675 return geolocation_permission_context_.get(); | |
| 676 } | 672 } |
| 677 | 673 |
| 678 content::SpeechRecognitionPreferences* | 674 content::SpeechRecognitionPreferences* |
| 679 TestingProfile::GetSpeechRecognitionPreferences() { | 675 TestingProfile::GetSpeechRecognitionPreferences() { |
| 680 #if defined(ENABLE_INPUT_SPEECH) | 676 #if defined(ENABLE_INPUT_SPEECH) |
| 681 return ChromeSpeechRecognitionPreferences::GetForProfile(this); | 677 return ChromeSpeechRecognitionPreferences::GetForProfile(this); |
| 682 #else | 678 #else |
| 683 return NULL; | 679 return NULL; |
| 684 #endif | 680 #endif |
| 685 } | 681 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 | 796 |
| 801 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 797 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
| 802 DCHECK(!build_called_); | 798 DCHECK(!build_called_); |
| 803 build_called_ = true; | 799 build_called_ = true; |
| 804 return scoped_ptr<TestingProfile>(new TestingProfile( | 800 return scoped_ptr<TestingProfile>(new TestingProfile( |
| 805 path_, | 801 path_, |
| 806 delegate_, | 802 delegate_, |
| 807 extension_policy_, | 803 extension_policy_, |
| 808 pref_service_.Pass())); | 804 pref_service_.Pass())); |
| 809 } | 805 } |
| OLD | NEW |