| 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_thread.h" | 17 #include "chrome/browser/browser_thread.h" |
| 18 #include "chrome/browser/content_settings/host_content_settings_map.h" | 18 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 19 #include "chrome/browser/dom_ui/chrome_url_data_manager.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_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
| 21 #include "chrome/browser/extensions/extension_pref_value_map.h" | 22 #include "chrome/browser/extensions/extension_pref_value_map.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" |
| 27 #include "chrome/browser/history/top_sites.h" | 28 #include "chrome/browser/history/top_sites.h" |
| 28 #include "chrome/browser/in_process_webkit/webkit_context.h" | 29 #include "chrome/browser/in_process_webkit/webkit_context.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 42 #include "chrome/common/notification_service.h" | 43 #include "chrome/common/notification_service.h" |
| 43 #include "chrome/common/url_constants.h" | 44 #include "chrome/common/url_constants.h" |
| 44 #include "chrome/test/test_url_request_context_getter.h" | 45 #include "chrome/test/test_url_request_context_getter.h" |
| 45 #include "chrome/test/testing_pref_service.h" | 46 #include "chrome/test/testing_pref_service.h" |
| 46 #include "chrome/test/ui_test_utils.h" | 47 #include "chrome/test/ui_test_utils.h" |
| 47 #include "net/base/cookie_monster.h" | 48 #include "net/base/cookie_monster.h" |
| 48 #include "net/url_request/url_request_context.h" | 49 #include "net/url_request/url_request_context.h" |
| 49 #include "net/url_request/url_request_test_util.h" | 50 #include "net/url_request/url_request_test_util.h" |
| 50 #include "testing/gmock/include/gmock/gmock.h" | 51 #include "testing/gmock/include/gmock/gmock.h" |
| 51 #include "webkit/database/database_tracker.h" | 52 #include "webkit/database/database_tracker.h" |
| 53 |
| 52 #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) | 54 #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) |
| 53 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" | 55 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" |
| 54 #endif | 56 #endif |
| 55 | 57 |
| 56 using base::Time; | 58 using base::Time; |
| 57 using testing::NiceMock; | 59 using testing::NiceMock; |
| 58 using testing::Return; | 60 using testing::Return; |
| 59 | 61 |
| 60 namespace { | 62 namespace { |
| 61 | 63 |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 } | 754 } |
| 753 | 755 |
| 754 PromoCounter* TestingProfile::GetInstantPromoCounter() { | 756 PromoCounter* TestingProfile::GetInstantPromoCounter() { |
| 755 return NULL; | 757 return NULL; |
| 756 } | 758 } |
| 757 | 759 |
| 758 policy::ProfilePolicyContext* TestingProfile::GetPolicyContext() { | 760 policy::ProfilePolicyContext* TestingProfile::GetPolicyContext() { |
| 759 return NULL; | 761 return NULL; |
| 760 } | 762 } |
| 761 | 763 |
| 764 ChromeURLDataManager* TestingProfile::GetChromeURLDataManager() { |
| 765 if (!chrome_url_data_manager_.get()) |
| 766 chrome_url_data_manager_.reset(new ChromeURLDataManager(this)); |
| 767 return chrome_url_data_manager_.get(); |
| 768 } |
| 769 |
| 762 PrerenderManager* TestingProfile::GetPrerenderManager() { | 770 PrerenderManager* TestingProfile::GetPrerenderManager() { |
| 763 return NULL; | 771 return NULL; |
| 764 } | 772 } |
| 765 | 773 |
| 766 PrefService* TestingProfile::GetOffTheRecordPrefs() { | 774 PrefService* TestingProfile::GetOffTheRecordPrefs() { |
| 767 return NULL; | 775 return NULL; |
| 768 } | 776 } |
| 769 | 777 |
| 770 void TestingProfile::DestroyWebDataService() { | 778 void TestingProfile::DestroyWebDataService() { |
| 771 if (!web_data_service_.get()) | 779 if (!web_data_service_.get()) |
| 772 return; | 780 return; |
| 773 | 781 |
| 774 web_data_service_->Shutdown(); | 782 web_data_service_->Shutdown(); |
| 775 } | 783 } |
| OLD | NEW |