Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(909)

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 11587003: Make ChromeGeolocationPermissionContextFactory a ProfileKeyedServiceFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android compile error. Add GetInstance() call to ProfileDependencyManager. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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);
rpetterson 2012/12/18 21:22:17 Normally GetForProfile will return NULL by default
John Knottenbelt 2012/12/19 16:01:09 I am not sure about the relationship between the T
rpetterson 2012/12/19 22:22:44 Apologies -- I was confusing TestingProfile and In
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 795
800 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { 796 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() {
801 DCHECK(!build_called_); 797 DCHECK(!build_called_);
802 build_called_ = true; 798 build_called_ = true;
803 return scoped_ptr<TestingProfile>(new TestingProfile( 799 return scoped_ptr<TestingProfile>(new TestingProfile(
804 path_, 800 path_,
805 delegate_, 801 delegate_,
806 extension_policy_, 802 extension_policy_,
807 pref_service_.Pass())); 803 pref_service_.Pass()));
808 } 804 }
OLDNEW
« chrome/browser/profiles/profile_impl.cc ('K') | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698