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