| 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/browser/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" | 28 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" |
| 29 #include "chrome/browser/profiles/profile_dependency_manager.h" | 29 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 30 #include "chrome/browser/ssl/ssl_host_state.h" | 30 #include "chrome/browser/ssl/ssl_host_state.h" |
| 31 #include "chrome/browser/sync/profile_sync_service.h" | 31 #include "chrome/browser/sync/profile_sync_service.h" |
| 32 #include "chrome/browser/themes/theme_service.h" | 32 #include "chrome/browser/themes/theme_service.h" |
| 33 #include "chrome/browser/transport_security_persister.h" | 33 #include "chrome/browser/transport_security_persister.h" |
| 34 #include "chrome/browser/ui/browser_list.h" | 34 #include "chrome/browser/ui/browser_list.h" |
| 35 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 35 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
| 36 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 36 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 37 #include "chrome/browser/ui/webui/extension_icon_source.h" | 37 #include "chrome/browser/ui/webui/extension_icon_source.h" |
| 38 #include "chrome/browser/ui/webui/print_preview_data_manager.h" |
| 38 #include "chrome/common/chrome_constants.h" | 39 #include "chrome/common/chrome_constants.h" |
| 39 #include "chrome/common/chrome_paths.h" | 40 #include "chrome/common/chrome_paths.h" |
| 40 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
| 41 #include "chrome/common/extensions/extension.h" | 42 #include "chrome/common/extensions/extension.h" |
| 42 #include "chrome/common/json_pref_store.h" | 43 #include "chrome/common/json_pref_store.h" |
| 43 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 44 #include "chrome/common/render_messages.h" | 45 #include "chrome/common/render_messages.h" |
| 45 #include "content/browser/appcache/chrome_appcache_service.h" | 46 #include "content/browser/appcache/chrome_appcache_service.h" |
| 46 #include "content/browser/browser_thread.h" | 47 #include "content/browser/browser_thread.h" |
| 47 #include "content/browser/chrome_blob_storage_context.h" | 48 #include "content/browser/chrome_blob_storage_context.h" |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 virtual ExtensionInfoMap* GetExtensionInfoMap() { | 654 virtual ExtensionInfoMap* GetExtensionInfoMap() { |
| 654 return profile_->GetExtensionInfoMap(); | 655 return profile_->GetExtensionInfoMap(); |
| 655 } | 656 } |
| 656 | 657 |
| 657 virtual ChromeURLDataManager* GetChromeURLDataManager() { | 658 virtual ChromeURLDataManager* GetChromeURLDataManager() { |
| 658 if (!chrome_url_data_manager_.get()) | 659 if (!chrome_url_data_manager_.get()) |
| 659 chrome_url_data_manager_.reset(new ChromeURLDataManager(this)); | 660 chrome_url_data_manager_.reset(new ChromeURLDataManager(this)); |
| 660 return chrome_url_data_manager_.get(); | 661 return chrome_url_data_manager_.get(); |
| 661 } | 662 } |
| 662 | 663 |
| 664 virtual PrintPreviewDataManager* GetPrintPreviewDataManager() { |
| 665 if (!print_preview_data_manager_.get()) |
| 666 print_preview_data_manager_ = new PrintPreviewDataManager(); |
| 667 return print_preview_data_manager_.get(); |
| 668 } |
| 669 |
| 663 virtual PromoCounter* GetInstantPromoCounter() { | 670 virtual PromoCounter* GetInstantPromoCounter() { |
| 664 return NULL; | 671 return NULL; |
| 665 } | 672 } |
| 666 | 673 |
| 667 #if defined(OS_CHROMEOS) | 674 #if defined(OS_CHROMEOS) |
| 668 virtual void ChangeAppLocale(const std::string& locale, AppLocaleChangedVia) { | 675 virtual void ChangeAppLocale(const std::string& locale, AppLocaleChangedVia) { |
| 669 } | 676 } |
| 670 virtual void OnLogin() { | 677 virtual void OnLogin() { |
| 671 } | 678 } |
| 672 #endif // defined(OS_CHROMEOS) | 679 #endif // defined(OS_CHROMEOS) |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 | 783 |
| 777 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 784 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| 778 | 785 |
| 779 // The file_system context for this profile. | 786 // The file_system context for this profile. |
| 780 scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 787 scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
| 781 | 788 |
| 782 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 789 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
| 783 | 790 |
| 784 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; | 791 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; |
| 785 | 792 |
| 793 scoped_refptr<PrintPreviewDataManager> print_preview_data_manager_; |
| 794 |
| 786 scoped_refptr<quota::QuotaManager> quota_manager_; | 795 scoped_refptr<quota::QuotaManager> quota_manager_; |
| 787 | 796 |
| 788 // Used read-only. | 797 // Used read-only. |
| 789 scoped_refptr<TransportSecurityPersister> transport_security_loader_; | 798 scoped_refptr<TransportSecurityPersister> transport_security_loader_; |
| 790 | 799 |
| 791 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); | 800 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); |
| 792 }; | 801 }; |
| 793 | 802 |
| 794 #if defined(OS_CHROMEOS) | 803 #if defined(OS_CHROMEOS) |
| 795 // Special case of the OffTheRecordProfileImpl which is used while Guest | 804 // Special case of the OffTheRecordProfileImpl which is used while Guest |
| (...skipping 19 matching lines...) Expand all Loading... |
| 815 }; | 824 }; |
| 816 #endif | 825 #endif |
| 817 | 826 |
| 818 Profile* Profile::CreateOffTheRecordProfile() { | 827 Profile* Profile::CreateOffTheRecordProfile() { |
| 819 #if defined(OS_CHROMEOS) | 828 #if defined(OS_CHROMEOS) |
| 820 if (Profile::IsGuestSession()) | 829 if (Profile::IsGuestSession()) |
| 821 return new GuestSessionProfile(this); | 830 return new GuestSessionProfile(this); |
| 822 #endif | 831 #endif |
| 823 return new OffTheRecordProfileImpl(this); | 832 return new OffTheRecordProfileImpl(this); |
| 824 } | 833 } |
| OLD | NEW |