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

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: Address sky's comments. Created 7 years, 11 months 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
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698