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

Side by Side Diff: chrome/browser/profiles/profile_impl.h

Issue 8591024: Correct the order of destruction of ProfileImplIOData and ExtensionProcessManager. This was causi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 // 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
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 SpellCheckProfile* GetSpellCheckProfile(); 183 SpellCheckProfile* GetSpellCheckProfile();
184 184
185 void UpdateProfileUserNameCache(); 185 void UpdateProfileUserNameCache();
186 186
187 content::NotificationRegistrar registrar_; 187 content::NotificationRegistrar registrar_;
188 PrefChangeRegistrar pref_change_registrar_; 188 PrefChangeRegistrar pref_change_registrar_;
189 189
190 FilePath path_; 190 FilePath path_;
191 FilePath base_cache_path_; 191 FilePath base_cache_path_;
192
193 // !!! BIG HONKING WARNING !!!
194 // The order of the members below is important. Do not change it unless
195 // you know what you're doing. Also, if adding a new member here make sure
196 // that the declaration occurs AFTER things it depends on as destruction
197 // happens in reverse order of declaration.
198
192 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; 199 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
193 // Keep |prefs_| on top for destruction order because |extension_prefs_|, 200 // Keep |prefs_| on top for destruction order because |extension_prefs_|,
194 // |net_pref_observer_|, |web_resource_service_|, and |io_data_| store 201 // |net_pref_observer_|, |web_resource_service_|, and |io_data_| store
195 // pointers to |prefs_| and shall be destructed first. 202 // pointers to |prefs_| and shall be destructed first.
196 scoped_ptr<PrefService> prefs_; 203 scoped_ptr<PrefService> prefs_;
197 scoped_ptr<PrefService> otr_prefs_; 204 scoped_ptr<PrefService> otr_prefs_;
198 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; 205 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_;
199 scoped_ptr<VisitedLinkMaster> visited_link_master_; 206 scoped_ptr<VisitedLinkMaster> visited_link_master_;
200 // Keep extension_prefs_ on top of extension_service_ because the latter 207 // Keep extension_prefs_ on top of extension_service_ because the latter
201 // maintains a pointer to the first and shall be destructed first. 208 // maintains a pointer to the first and shall be destructed first.
202 scoped_ptr<ExtensionPrefs> extension_prefs_; 209 scoped_ptr<ExtensionPrefs> extension_prefs_;
203 scoped_ptr<ExtensionService> extension_service_; 210 scoped_ptr<ExtensionService> extension_service_;
204 scoped_refptr<UserScriptMaster> user_script_master_; 211 scoped_refptr<UserScriptMaster> user_script_master_;
212
213 // io_data_ needs to outlive extension_process_manager_.
willchan no longer on Chromium 2011/11/17 20:11:32 |io_data_| needs to outlive a lot of things. Rathe
robertshield 2011/11/17 21:00:43 Done.
214 // While the extension_process_manager_ still lives, we handle incoming
215 // resource requests from extension processes and those require access
216 // to the ResourceContext owned by io_data_.
217 ProfileImplIOData::Handle io_data_;
218
205 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; 219 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_;
206 // extension_info_map_ needs to outlive extension_process_manager_. 220 // extension_info_map_ needs to outlive extension_process_manager_.
207 scoped_refptr<ExtensionInfoMap> extension_info_map_; 221 scoped_refptr<ExtensionInfoMap> extension_info_map_;
208 scoped_ptr<ExtensionProcessManager> extension_process_manager_; 222 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
209 scoped_refptr<ExtensionMessageService> extension_message_service_; 223 scoped_refptr<ExtensionMessageService> extension_message_service_;
210 scoped_ptr<ExtensionEventRouter> extension_event_router_; 224 scoped_ptr<ExtensionEventRouter> extension_event_router_;
211 scoped_ptr<ExtensionNavigationObserver> extension_navigation_observer_; 225 scoped_ptr<ExtensionNavigationObserver> extension_navigation_observer_;
212 scoped_refptr<ExtensionSpecialStoragePolicy> 226 scoped_refptr<ExtensionSpecialStoragePolicy>
213 extension_special_storage_policy_; 227 extension_special_storage_policy_;
214 scoped_ptr<SSLHostState> ssl_host_state_; 228 scoped_ptr<SSLHostState> ssl_host_state_;
215 scoped_ptr<NetPrefObserver> net_pref_observer_; 229 scoped_ptr<NetPrefObserver> net_pref_observer_;
216 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; 230 scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
217 scoped_ptr<BookmarkModel> bookmark_bar_model_; 231 scoped_ptr<BookmarkModel> bookmark_bar_model_;
218 scoped_refptr<PromoResourceService> promo_resource_service_; 232 scoped_refptr<PromoResourceService> promo_resource_service_;
219 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; 233 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_;
220 234
221 scoped_ptr<TokenService> token_service_; 235 scoped_ptr<TokenService> token_service_;
222 scoped_ptr<ProfileSyncFactory> profile_sync_factory_; 236 scoped_ptr<ProfileSyncFactory> profile_sync_factory_;
223 scoped_ptr<ProfileSyncService> sync_service_; 237 scoped_ptr<ProfileSyncService> sync_service_;
224 238
225 ProfileImplIOData::Handle io_data_;
226
227 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 239 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
228 240
229 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 241 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
230 scoped_refptr<HostZoomMap> host_zoom_map_; 242 scoped_refptr<HostZoomMap> host_zoom_map_;
231 scoped_refptr<GeolocationPermissionContext> 243 scoped_refptr<GeolocationPermissionContext>
232 geolocation_permission_context_; 244 geolocation_permission_context_;
233 scoped_refptr<SpeechInputPreferences> speech_input_preferences_; 245 scoped_refptr<SpeechInputPreferences> speech_input_preferences_;
234 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; 246 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_;
235 scoped_ptr<FindBarState> find_bar_state_; 247 scoped_ptr<FindBarState> find_bar_state_;
236 scoped_refptr<HistoryService> history_service_; 248 scoped_refptr<HistoryService> history_service_;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; 303 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_;
292 304
293 Profile::Delegate* delegate_; 305 Profile::Delegate* delegate_;
294 306
295 chrome_browser_net::Predictor* predictor_; 307 chrome_browser_net::Predictor* predictor_;
296 308
297 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 309 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
298 }; 310 };
299 311
300 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 312 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_io_data.cc » ('j') | chrome/browser/profiles/profile_io_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698