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

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 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 void GetCacheParameters(bool is_media_context, 192 void GetCacheParameters(bool is_media_context,
193 FilePath* cache_path, 193 FilePath* cache_path,
194 int* max_size); 194 int* max_size);
195 195
196 content::NotificationRegistrar registrar_; 196 content::NotificationRegistrar registrar_;
197 PrefChangeRegistrar pref_change_registrar_; 197 PrefChangeRegistrar pref_change_registrar_;
198 198
199 FilePath path_; 199 FilePath path_;
200 FilePath base_cache_path_; 200 FilePath base_cache_path_;
201
202 // !!! BIG HONKING WARNING !!!
203 // The order of the members below is important. Do not change it unless
204 // you know what you're doing. Also, if adding a new member here make sure
205 // that the declaration occurs AFTER things it depends on as destruction
206 // happens in reverse order of declaration.
207
201 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; 208 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
202 // Keep |prefs_| on top for destruction order because |extension_prefs_|, 209 // Keep |prefs_| on top for destruction order because |extension_prefs_|,
203 // |net_pref_observer_|, |web_resource_service_|, and |io_data_| store 210 // |net_pref_observer_|, |web_resource_service_|, and |io_data_| store
204 // pointers to |prefs_| and shall be destructed first. 211 // pointers to |prefs_| and shall be destructed first.
205 scoped_ptr<PrefService> prefs_; 212 scoped_ptr<PrefService> prefs_;
206 scoped_ptr<PrefService> otr_prefs_; 213 scoped_ptr<PrefService> otr_prefs_;
207 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; 214 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_;
208 scoped_ptr<VisitedLinkMaster> visited_link_master_; 215 scoped_ptr<VisitedLinkMaster> visited_link_master_;
209 // Keep extension_prefs_ on top of extension_service_ because the latter 216 // Keep extension_prefs_ on top of extension_service_ because the latter
210 // maintains a pointer to the first and shall be destructed first. 217 // maintains a pointer to the first and shall be destructed first.
211 scoped_ptr<ExtensionPrefs> extension_prefs_; 218 scoped_ptr<ExtensionPrefs> extension_prefs_;
212 scoped_ptr<ExtensionService> extension_service_; 219 scoped_ptr<ExtensionService> extension_service_;
213 scoped_refptr<UserScriptMaster> user_script_master_; 220 scoped_refptr<UserScriptMaster> user_script_master_;
221
222 ProfileImplIOData::Handle io_data_;
223
214 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; 224 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_;
215 // extension_info_map_ needs to outlive extension_process_manager_. 225 // extension_info_map_ needs to outlive extension_process_manager_.
216 scoped_refptr<ExtensionInfoMap> extension_info_map_; 226 scoped_refptr<ExtensionInfoMap> extension_info_map_;
227 // |extension_process_manager_| must be destroyed before |io_data_|.
228 // While |extension_process_manager_| still lives, we handle incoming
229 // resource requests from extension processes and those require access
230 // to the ResourceContext owned by |io_data_|.
217 scoped_ptr<ExtensionProcessManager> extension_process_manager_; 231 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
218 scoped_refptr<ExtensionMessageService> extension_message_service_; 232 scoped_refptr<ExtensionMessageService> extension_message_service_;
219 scoped_ptr<ExtensionEventRouter> extension_event_router_; 233 scoped_ptr<ExtensionEventRouter> extension_event_router_;
220 scoped_ptr<ExtensionNavigationObserver> extension_navigation_observer_; 234 scoped_ptr<ExtensionNavigationObserver> extension_navigation_observer_;
221 scoped_refptr<ExtensionSpecialStoragePolicy> 235 scoped_refptr<ExtensionSpecialStoragePolicy>
222 extension_special_storage_policy_; 236 extension_special_storage_policy_;
223 scoped_ptr<SSLHostState> ssl_host_state_; 237 scoped_ptr<SSLHostState> ssl_host_state_;
224 scoped_ptr<NetPrefObserver> net_pref_observer_; 238 scoped_ptr<NetPrefObserver> net_pref_observer_;
225 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; 239 scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
226 scoped_ptr<BookmarkModel> bookmark_bar_model_; 240 scoped_ptr<BookmarkModel> bookmark_bar_model_;
227 scoped_refptr<PromoResourceService> promo_resource_service_; 241 scoped_refptr<PromoResourceService> promo_resource_service_;
228 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; 242 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_;
229 243
230 scoped_ptr<TokenService> token_service_; 244 scoped_ptr<TokenService> token_service_;
231 scoped_ptr<ProfileSyncComponentsFactory> profile_sync_factory_; 245 scoped_ptr<ProfileSyncComponentsFactory> profile_sync_factory_;
232 scoped_ptr<ProfileSyncService> sync_service_; 246 scoped_ptr<ProfileSyncService> sync_service_;
233 247
234 ProfileImplIOData::Handle io_data_;
235
236 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 248 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
237 249
238 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 250 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
239 scoped_refptr<HostZoomMap> host_zoom_map_; 251 scoped_refptr<HostZoomMap> host_zoom_map_;
240 scoped_refptr<GeolocationPermissionContext> 252 scoped_refptr<GeolocationPermissionContext>
241 geolocation_permission_context_; 253 geolocation_permission_context_;
242 scoped_refptr<SpeechInputPreferences> speech_input_preferences_; 254 scoped_refptr<SpeechInputPreferences> speech_input_preferences_;
243 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_; 255 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher_;
244 scoped_ptr<FindBarState> find_bar_state_; 256 scoped_ptr<FindBarState> find_bar_state_;
245 scoped_refptr<HistoryService> history_service_; 257 scoped_refptr<HistoryService> history_service_;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; 312 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_;
301 313
302 Profile::Delegate* delegate_; 314 Profile::Delegate* delegate_;
303 315
304 chrome_browser_net::Predictor* predictor_; 316 chrome_browser_net::Predictor* predictor_;
305 317
306 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 318 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
307 }; 319 };
308 320
309 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 321 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698