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

Side by Side Diff: chrome/browser/profiles/profile.cc

Issue 6479007: Attempt 3 at: Splits ChromeURLDataManager into 2 chunks:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/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/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "chrome/browser/background_contents_service.h" 15 #include "chrome/browser/background_contents_service.h"
16 #include "chrome/browser/browser_list.h" 16 #include "chrome/browser/browser_list.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/browser_thread.h" 18 #include "chrome/browser/browser_thread.h"
19 #include "chrome/browser/chrome_blob_storage_context.h" 19 #include "chrome/browser/chrome_blob_storage_context.h"
20 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
20 #include "chrome/browser/download/download_manager.h" 21 #include "chrome/browser/download/download_manager.h"
21 #include "chrome/browser/extensions/extension_message_service.h" 22 #include "chrome/browser/extensions/extension_message_service.h"
22 #include "chrome/browser/extensions/extension_pref_store.h" 23 #include "chrome/browser/extensions/extension_pref_store.h"
23 #include "chrome/browser/extensions/extension_process_manager.h" 24 #include "chrome/browser/extensions/extension_process_manager.h"
24 #include "chrome/browser/file_system/browser_file_system_helper.h" 25 #include "chrome/browser/file_system/browser_file_system_helper.h"
25 #include "chrome/browser/in_process_webkit/webkit_context.h" 26 #include "chrome/browser/in_process_webkit/webkit_context.h"
26 #include "chrome/browser/net/chrome_url_request_context.h" 27 #include "chrome/browser/net/chrome_url_request_context.h"
27 #include "chrome/browser/net/pref_proxy_config_service.h" 28 #include "chrome/browser/net/pref_proxy_config_service.h"
28 #include "chrome/browser/notifications/desktop_notification_service.h" 29 #include "chrome/browser/notifications/desktop_notification_service.h"
29 #include "chrome/browser/ssl/ssl_host_state.h" 30 #include "chrome/browser/ssl/ssl_host_state.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } 624 }
624 625
625 virtual ExtensionInfoMap* GetExtensionInfoMap() { 626 virtual ExtensionInfoMap* GetExtensionInfoMap() {
626 return profile_->GetExtensionInfoMap(); 627 return profile_->GetExtensionInfoMap();
627 } 628 }
628 629
629 virtual policy::ProfilePolicyContext* GetPolicyContext() { 630 virtual policy::ProfilePolicyContext* GetPolicyContext() {
630 return NULL; 631 return NULL;
631 } 632 }
632 633
634 virtual ChromeURLDataManager* GetChromeURLDataManager() {
635 if (!chrome_url_data_manager_.get())
636 chrome_url_data_manager_.reset(new ChromeURLDataManager(this));
637 return chrome_url_data_manager_.get();
638 }
639
633 virtual PromoCounter* GetInstantPromoCounter() { 640 virtual PromoCounter* GetInstantPromoCounter() {
634 return NULL; 641 return NULL;
635 } 642 }
636 643
637 #if defined(OS_CHROMEOS) 644 #if defined(OS_CHROMEOS)
638 virtual void ChangeAppLocale(const std::string& locale, AppLocaleChangedVia) { 645 virtual void ChangeAppLocale(const std::string& locale, AppLocaleChangedVia) {
639 } 646 }
640 #endif // defined(OS_CHROMEOS) 647 #endif // defined(OS_CHROMEOS)
641 648
642 virtual PrefProxyConfigTracker* GetProxyConfigTracker() { 649 virtual PrefProxyConfigTracker* GetProxyConfigTracker() {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 // Tracks all BackgroundContents running under this profile. 719 // Tracks all BackgroundContents running under this profile.
713 scoped_ptr<BackgroundContentsService> background_contents_service_; 720 scoped_ptr<BackgroundContentsService> background_contents_service_;
714 721
715 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; 722 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
716 723
717 // The file_system context for this profile. 724 // The file_system context for this profile.
718 scoped_refptr<fileapi::SandboxedFileSystemContext> file_system_context_; 725 scoped_refptr<fileapi::SandboxedFileSystemContext> file_system_context_;
719 726
720 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; 727 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
721 728
729 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_;
730
722 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); 731 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
723 }; 732 };
724 733
725 #if defined(OS_CHROMEOS) 734 #if defined(OS_CHROMEOS)
726 // Special case of the OffTheRecordProfileImpl which is used while Guest 735 // Special case of the OffTheRecordProfileImpl which is used while Guest
727 // session in CrOS. 736 // session in CrOS.
728 class GuestSessionProfile : public OffTheRecordProfileImpl { 737 class GuestSessionProfile : public OffTheRecordProfileImpl {
729 public: 738 public:
730 explicit GuestSessionProfile(Profile* real_profile) 739 explicit GuestSessionProfile(Profile* real_profile)
731 : OffTheRecordProfileImpl(real_profile) { 740 : OffTheRecordProfileImpl(real_profile) {
732 } 741 }
733 742
734 virtual PersonalDataManager* GetPersonalDataManager() { 743 virtual PersonalDataManager* GetPersonalDataManager() {
735 return GetOriginalProfile()->GetPersonalDataManager(); 744 return GetOriginalProfile()->GetPersonalDataManager();
736 } 745 }
737 }; 746 };
738 #endif 747 #endif
739 748
740 Profile* Profile::CreateOffTheRecordProfile() { 749 Profile* Profile::CreateOffTheRecordProfile() {
741 #if defined(OS_CHROMEOS) 750 #if defined(OS_CHROMEOS)
742 if (Profile::IsGuestSession()) 751 if (Profile::IsGuestSession())
743 return new GuestSessionProfile(this); 752 return new GuestSessionProfile(this);
744 #endif 753 #endif
745 return new OffTheRecordProfileImpl(this); 754 return new OffTheRecordProfileImpl(this);
746 } 755 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698