| OLD | NEW |
| 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/testing_profile.h" | 5 #include "chrome/test/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" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop_proxy.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
| 15 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 15 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
| 16 #include "chrome/browser/bookmarks/bookmark_model.h" | 16 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 17 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/browser_thread.h" | 18 #include "chrome/browser/browser_thread.h" |
| 18 #include "chrome/browser/content_settings/host_content_settings_map.h" | 19 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 19 #include "chrome/browser/dom_ui/ntp_resource_cache.h" | 20 #include "chrome/browser/dom_ui/ntp_resource_cache.h" |
| 20 #include "chrome/browser/extensions/extension_pref_value_map.h" | 21 #include "chrome/browser/extensions/extension_pref_value_map.h" |
| 21 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
| 22 #include "chrome/browser/favicon_service.h" | 23 #include "chrome/browser/favicon_service.h" |
| 23 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 24 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| 24 #include "chrome/browser/geolocation/geolocation_permission_context.h" | 25 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
| 25 #include "chrome/browser/history/history.h" | 26 #include "chrome/browser/history/history.h" |
| 26 #include "chrome/browser/history/history_backend.h" | 27 #include "chrome/browser/history/history_backend.h" |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 | 697 |
| 697 FilePath TestingProfile::last_selected_directory() { | 698 FilePath TestingProfile::last_selected_directory() { |
| 698 return last_selected_directory_; | 699 return last_selected_directory_; |
| 699 } | 700 } |
| 700 | 701 |
| 701 void TestingProfile::set_last_selected_directory(const FilePath& path) { | 702 void TestingProfile::set_last_selected_directory(const FilePath& path) { |
| 702 last_selected_directory_ = path; | 703 last_selected_directory_ = path; |
| 703 } | 704 } |
| 704 | 705 |
| 705 PrefProxyConfigTracker* TestingProfile::GetProxyConfigTracker() { | 706 PrefProxyConfigTracker* TestingProfile::GetProxyConfigTracker() { |
| 706 if (!pref_proxy_config_tracker_) | 707 if (!pref_proxy_config_tracker_) { |
| 707 pref_proxy_config_tracker_ = new PrefProxyConfigTracker(GetPrefs()); | 708 pref_proxy_config_tracker_ = |
| 709 new PrefProxyConfigTracker(GetPrefs(), |
| 710 g_browser_process->local_state()); |
| 711 } |
| 708 | 712 |
| 709 return pref_proxy_config_tracker_; | 713 return pref_proxy_config_tracker_; |
| 710 } | 714 } |
| 711 | 715 |
| 712 void TestingProfile::BlockUntilHistoryProcessesPendingRequests() { | 716 void TestingProfile::BlockUntilHistoryProcessesPendingRequests() { |
| 713 DCHECK(history_service_.get()); | 717 DCHECK(history_service_.get()); |
| 714 DCHECK(MessageLoop::current()); | 718 DCHECK(MessageLoop::current()); |
| 715 | 719 |
| 716 CancelableRequestConsumer consumer; | 720 CancelableRequestConsumer consumer; |
| 717 history_service_->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer); | 721 history_service_->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 } | 787 } |
| 784 | 788 |
| 785 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) | 789 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) |
| 786 : original_profile_(profile) {} | 790 : original_profile_(profile) {} |
| 787 | 791 |
| 788 DerivedTestingProfile::~DerivedTestingProfile() {} | 792 DerivedTestingProfile::~DerivedTestingProfile() {} |
| 789 | 793 |
| 790 ProfileId DerivedTestingProfile::GetRuntimeId() { | 794 ProfileId DerivedTestingProfile::GetRuntimeId() { |
| 791 return original_profile_->GetRuntimeId(); | 795 return original_profile_->GetRuntimeId(); |
| 792 } | 796 } |
| OLD | NEW |