OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 #include "base/timer.h" | 14 #include "base/timer.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/prefs/pref_change_registrar.h" | 16 #include "chrome/browser/prefs/pref_change_registrar.h" |
17 #include "chrome/browser/spellcheck_host_observer.h" | 17 #include "chrome/browser/spellcheck_host_observer.h" |
18 #include "chrome/common/notification_observer.h" | 18 #include "chrome/common/notification_observer.h" |
19 #include "chrome/common/notification_registrar.h" | 19 #include "chrome/common/notification_registrar.h" |
20 | 20 |
21 class BackgroundModeManager; | 21 class BackgroundModeManager; |
22 class ExtensionPrefs; | 22 class ExtensionPrefs; |
23 class ExtensionPrefValueMap; | |
23 class PrefService; | 24 class PrefService; |
24 | 25 |
25 #if defined(OS_CHROMEOS) | 26 #if defined(OS_CHROMEOS) |
26 namespace chromeos { | 27 namespace chromeos { |
27 class Preferences; | 28 class Preferences; |
28 } | 29 } |
29 #endif | 30 #endif |
30 | 31 |
31 class NetPrefObserver; | 32 class NetPrefObserver; |
32 | 33 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 virtual PrerenderManager* GetPrerenderManager(); | 138 virtual PrerenderManager* GetPrerenderManager(); |
138 | 139 |
139 // NotificationObserver implementation. | 140 // NotificationObserver implementation. |
140 virtual void Observe(NotificationType type, | 141 virtual void Observe(NotificationType type, |
141 const NotificationSource& source, | 142 const NotificationSource& source, |
142 const NotificationDetails& details); | 143 const NotificationDetails& details); |
143 | 144 |
144 // SpellCheckHostObserver implementation. | 145 // SpellCheckHostObserver implementation. |
145 virtual void SpellCheckHostInitialized(); | 146 virtual void SpellCheckHostInitialized(); |
146 | 147 |
148 protected: | |
149 ExtensionPrefValueMap* GetExtensionPrefValueMap(); | |
danno
2011/01/14 13:05:09
virtual, maybe private, again your call.
battre
2011/01/20 17:59:29
Made virtual, not private.
| |
150 | |
147 private: | 151 private: |
148 friend class Profile; | 152 friend class Profile; |
149 | 153 |
150 explicit ProfileImpl(const FilePath& path); | 154 explicit ProfileImpl(const FilePath& path); |
151 | 155 |
152 void CreateWebDataService(); | 156 void CreateWebDataService(); |
153 FilePath GetPrefFilePath(); | 157 FilePath GetPrefFilePath(); |
154 | 158 |
155 void CreatePasswordStore(); | 159 void CreatePasswordStore(); |
156 | 160 |
157 void StopCreateSessionServiceTimer(); | 161 void StopCreateSessionServiceTimer(); |
158 | 162 |
159 void EnsureRequestContextCreated() { | 163 void EnsureRequestContextCreated() { |
160 GetRequestContext(); | 164 GetRequestContext(); |
161 } | 165 } |
162 | 166 |
163 void EnsureSessionServiceCreated() { | 167 void EnsureSessionServiceCreated() { |
164 GetSessionService(); | 168 GetSessionService(); |
165 } | 169 } |
166 | 170 |
167 void RegisterComponentExtensions(); | 171 void RegisterComponentExtensions(); |
168 void InstallDefaultApps(); | 172 void InstallDefaultApps(); |
169 | 173 |
170 NotificationRegistrar registrar_; | 174 NotificationRegistrar registrar_; |
171 PrefChangeRegistrar pref_change_registrar_; | 175 PrefChangeRegistrar pref_change_registrar_; |
172 | 176 |
173 FilePath path_; | 177 FilePath path_; |
174 FilePath base_cache_path_; | 178 FilePath base_cache_path_; |
179 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; | |
175 // Keep prefs_ on top for destruction order because extension_prefs_, | 180 // Keep prefs_ on top for destruction order because extension_prefs_, |
176 // net_pref_observer_, web_resource_service_ and background_contents_service_ | 181 // net_pref_observer_, web_resource_service_ and background_contents_service_ |
177 // store pointers to prefs_ and shall be destructed first. | 182 // store pointers to prefs_ and shall be destructed first. |
178 scoped_ptr<PrefService> prefs_; | 183 scoped_ptr<PrefService> prefs_; |
179 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; | 184 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; |
180 scoped_ptr<VisitedLinkMaster> visited_link_master_; | 185 scoped_ptr<VisitedLinkMaster> visited_link_master_; |
181 // Keep extension_prefs_ on top of extensions_service_ because the latter | 186 // Keep extension_prefs_ on top of extensions_service_ because the latter |
182 // maintains a pointer to the first and shall be destructed first. | 187 // maintains a pointer to the first and shall be destructed first. |
183 scoped_ptr<ExtensionPrefs> extension_prefs_; | 188 scoped_ptr<ExtensionPrefs> extension_prefs_; |
184 scoped_refptr<ExtensionService> extensions_service_; | 189 scoped_refptr<ExtensionService> extensions_service_; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
297 #endif | 302 #endif |
298 | 303 |
299 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 304 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
300 | 305 |
301 scoped_ptr<PrerenderManager> prerender_manager_; | 306 scoped_ptr<PrerenderManager> prerender_manager_; |
302 | 307 |
303 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 308 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
304 }; | 309 }; |
305 | 310 |
306 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 311 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |