| 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/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" |
| 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_process.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/custom_handlers/protocol_handler_registry.h" | 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 20 #include "chrome/browser/extensions/extension_pref_value_map.h" | 20 #include "chrome/browser/extensions/extension_pref_value_map.h" |
| 21 #include "chrome/browser/extensions/extension_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
| 22 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 22 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 23 #include "chrome/browser/favicon/favicon_service.h" | 23 #include "chrome/browser/favicon/favicon_service.h" |
| 24 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | 24 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
| 25 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 25 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| 26 #include "chrome/browser/history/history.h" | 26 #include "chrome/browser/history/history.h" |
| 27 #include "chrome/browser/history/history_backend.h" | 27 #include "chrome/browser/history/history_backend.h" |
| 28 #include "chrome/browser/history/top_sites.h" | 28 #include "chrome/browser/history/top_sites.h" |
| 29 #include "chrome/browser/intents/web_intents_registry.h" |
| 29 #include "chrome/browser/net/gaia/token_service.h" | 30 #include "chrome/browser/net/gaia/token_service.h" |
| 30 #include "chrome/browser/net/pref_proxy_config_service.h" | 31 #include "chrome/browser/net/pref_proxy_config_service.h" |
| 31 #include "chrome/browser/notifications/desktop_notification_service.h" | 32 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 32 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 33 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 33 #include "chrome/browser/prefs/browser_prefs.h" | 34 #include "chrome/browser/prefs/browser_prefs.h" |
| 34 #include "chrome/browser/prefs/testing_pref_store.h" | 35 #include "chrome/browser/prefs/testing_pref_store.h" |
| 35 #include "chrome/browser/prerender/prerender_manager.h" | 36 #include "chrome/browser/prerender/prerender_manager.h" |
| 36 #include "chrome/browser/profiles/profile_dependency_manager.h" | 37 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 37 #include "chrome/browser/search_engines/template_url_fetcher.h" | 38 #include "chrome/browser/search_engines/template_url_fetcher.h" |
| 38 #include "chrome/browser/search_engines/template_url_service.h" | 39 #include "chrome/browser/search_engines/template_url_service.h" |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 522 } |
| 522 | 523 |
| 523 DownloadManager* TestingProfile::GetDownloadManager() { | 524 DownloadManager* TestingProfile::GetDownloadManager() { |
| 524 return NULL; | 525 return NULL; |
| 525 } | 526 } |
| 526 | 527 |
| 527 PersonalDataManager* TestingProfile::GetPersonalDataManager() { | 528 PersonalDataManager* TestingProfile::GetPersonalDataManager() { |
| 528 return NULL; | 529 return NULL; |
| 529 } | 530 } |
| 530 | 531 |
| 532 void TestingProfile::SetWebIntentsRegistry(WebIntentsRegistry* registry) { |
| 533 web_intents_registry_ = registry; |
| 534 } |
| 535 |
| 536 WebIntentsRegistry* TestingProfile::GetWebIntentsRegistry() { |
| 537 return web_intents_registry_.get(); |
| 538 } |
| 539 |
| 531 fileapi::FileSystemContext* TestingProfile::GetFileSystemContext() { | 540 fileapi::FileSystemContext* TestingProfile::GetFileSystemContext() { |
| 532 if (!file_system_context_) { | 541 if (!file_system_context_) { |
| 533 file_system_context_ = new fileapi::FileSystemContext( | 542 file_system_context_ = new fileapi::FileSystemContext( |
| 534 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 543 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 535 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 544 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| 536 GetExtensionSpecialStoragePolicy(), | 545 GetExtensionSpecialStoragePolicy(), |
| 537 NULL, | 546 NULL, |
| 538 GetPath(), | 547 GetPath(), |
| 539 IsOffTheRecord(), | 548 IsOffTheRecord(), |
| 540 true, // Allow file access from files. | 549 true, // Allow file access from files. |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { | 797 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { |
| 789 return GetExtensionSpecialStoragePolicy(); | 798 return GetExtensionSpecialStoragePolicy(); |
| 790 } | 799 } |
| 791 | 800 |
| 792 void TestingProfile::DestroyWebDataService() { | 801 void TestingProfile::DestroyWebDataService() { |
| 793 if (!web_data_service_.get()) | 802 if (!web_data_service_.get()) |
| 794 return; | 803 return; |
| 795 | 804 |
| 796 web_data_service_->Shutdown(); | 805 web_data_service_->Shutdown(); |
| 797 } | 806 } |
| OLD | NEW |