Fix crash in policy code caused by early shutdown.

BUG=128328,127396
TEST=Starting chrome with --try-chrome-again=10001 doesn't crash in policy code anymore


Review URL: https://chromiumcodereview.appspot.com/10388211

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138460 0039d316-1c4b-4281-b951-d872f2087c98
parent 6a5cbbb8
...@@ -126,10 +126,10 @@ using content::ResourceDispatcherHost; ...@@ -126,10 +126,10 @@ using content::ResourceDispatcherHost;
BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line) BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line)
: created_metrics_service_(false), : created_metrics_service_(false),
created_watchdog_thread_(false), created_watchdog_thread_(false),
created_browser_policy_connector_(false),
created_profile_manager_(false), created_profile_manager_(false),
created_local_state_(false), created_local_state_(false),
created_icon_manager_(false), created_icon_manager_(false),
created_browser_policy_connector_(false),
created_notification_ui_manager_(false), created_notification_ui_manager_(false),
created_safe_browsing_service_(false), created_safe_browsing_service_(false),
module_ref_count_(0), module_ref_count_(0),
......
...@@ -154,6 +154,11 @@ class BrowserProcessImpl : public BrowserProcess, ...@@ -154,6 +154,11 @@ class BrowserProcessImpl : public BrowserProcess,
bool created_watchdog_thread_; bool created_watchdog_thread_;
scoped_ptr<WatchDogThread> watchdog_thread_; scoped_ptr<WatchDogThread> watchdog_thread_;
// Must be destroyed after |policy_service_| if StartTearDown() isn't invoked
// during an early shutdown.
bool created_browser_policy_connector_;
scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_;
// Must be destroyed after |local_state_|. // Must be destroyed after |local_state_|.
scoped_ptr<policy::PolicyService> policy_service_; scoped_ptr<policy::PolicyService> policy_service_;
...@@ -171,9 +176,6 @@ class BrowserProcessImpl : public BrowserProcess, ...@@ -171,9 +176,6 @@ class BrowserProcessImpl : public BrowserProcess,
scoped_ptr<RemoteDebuggingServer> remote_debugging_server_; scoped_ptr<RemoteDebuggingServer> remote_debugging_server_;
bool created_browser_policy_connector_;
scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_;
scoped_refptr<printing::PrintPreviewTabController> scoped_refptr<printing::PrintPreviewTabController>
print_preview_tab_controller_; print_preview_tab_controller_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment