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

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

Issue 7989001: Remove use of default request context and fix use of speech censor flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update SpeechInputPreferences when preference changes Created 9 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "chrome/common/chrome_constants.h" 43 #include "chrome/common/chrome_constants.h"
44 #include "chrome/common/chrome_notification_types.h" 44 #include "chrome/common/chrome_notification_types.h"
45 #include "chrome/common/url_constants.h" 45 #include "chrome/common/url_constants.h"
46 #include "chrome/test/base/bookmark_load_observer.h" 46 #include "chrome/test/base/bookmark_load_observer.h"
47 #include "chrome/test/base/test_url_request_context_getter.h" 47 #include "chrome/test/base/test_url_request_context_getter.h"
48 #include "chrome/test/base/testing_pref_service.h" 48 #include "chrome/test/base/testing_pref_service.h"
49 #include "chrome/test/base/ui_test_utils.h" 49 #include "chrome/test/base/ui_test_utils.h"
50 #include "content/browser/browser_thread.h" 50 #include "content/browser/browser_thread.h"
51 #include "content/browser/in_process_webkit/webkit_context.h" 51 #include "content/browser/in_process_webkit/webkit_context.h"
52 #include "content/browser/mock_resource_context.h" 52 #include "content/browser/mock_resource_context.h"
53 #include "content/browser/speech/speech_input_preferences.h"
53 #include "content/common/notification_service.h" 54 #include "content/common/notification_service.h"
54 #include "net/base/cookie_monster.h" 55 #include "net/base/cookie_monster.h"
55 #include "net/url_request/url_request_context.h" 56 #include "net/url_request/url_request_context.h"
56 #include "net/url_request/url_request_context_getter.h" 57 #include "net/url_request/url_request_context_getter.h"
57 #include "net/url_request/url_request_test_util.h" 58 #include "net/url_request/url_request_test_util.h"
58 #include "testing/gmock/include/gmock/gmock.h" 59 #include "testing/gmock/include/gmock/gmock.h"
59 #include "webkit/database/database_tracker.h" 60 #include "webkit/database/database_tracker.h"
60 #include "webkit/fileapi/file_system_context.h" 61 #include "webkit/fileapi/file_system_context.h"
61 #include "webkit/quota/quota_manager.h" 62 #include "webkit/quota/quota_manager.h"
62 #include "webkit/quota/mock_quota_manager.h" 63 #include "webkit/quota/mock_quota_manager.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 634
634 GeolocationPermissionContext* 635 GeolocationPermissionContext*
635 TestingProfile::GetGeolocationPermissionContext() { 636 TestingProfile::GetGeolocationPermissionContext() {
636 if (!geolocation_permission_context_.get()) { 637 if (!geolocation_permission_context_.get()) {
637 geolocation_permission_context_ = 638 geolocation_permission_context_ =
638 new ChromeGeolocationPermissionContext(this); 639 new ChromeGeolocationPermissionContext(this);
639 } 640 }
640 return geolocation_permission_context_.get(); 641 return geolocation_permission_context_.get();
641 } 642 }
642 643
644 SpeechInputPreferences* TestingProfile::GetSpeechInputPreferences() {
645 if (!speech_input_preferences_.get())
646 speech_input_preferences_ = new SpeechInputPreferences(true);
647 return speech_input_preferences_.get();
648 }
649
643 HostZoomMap* TestingProfile::GetHostZoomMap() { 650 HostZoomMap* TestingProfile::GetHostZoomMap() {
644 return NULL; 651 return NULL;
645 } 652 }
646 653
647 bool TestingProfile::HasProfileSyncService() const { 654 bool TestingProfile::HasProfileSyncService() const {
648 return (profile_sync_service_.get() != NULL); 655 return (profile_sync_service_.get() != NULL);
649 } 656 }
650 657
651 std::wstring TestingProfile::GetName() { 658 std::wstring TestingProfile::GetName() {
652 return std::wstring(); 659 return std::wstring();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 804 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
798 return GetExtensionSpecialStoragePolicy(); 805 return GetExtensionSpecialStoragePolicy();
799 } 806 }
800 807
801 void TestingProfile::DestroyWebDataService() { 808 void TestingProfile::DestroyWebDataService() {
802 if (!web_data_service_.get()) 809 if (!web_data_service_.get())
803 return; 810 return;
804 811
805 web_data_service_->Shutdown(); 812 web_data_service_->Shutdown();
806 } 813 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698