diff options
author | jdufault <jdufault@chromium.org> | 2016-01-11 16:49:16 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-12 00:50:57 +0000 |
commit | 27901c85de3683b96e187d5b05a676297d3e84f6 (patch) | |
tree | e1dfbf87e268b27ba087502c37dc4905b76a4bda /ash/system | |
parent | f7c2408790c678b070d24b51497f52eedf12eed9 (diff) | |
download | chromium_src-27901c85de3683b96e187d5b05a676297d3e84f6.zip chromium_src-27901c85de3683b96e187d5b05a676297d3e84f6.tar.gz chromium_src-27901c85de3683b96e187d5b05a676297d3e84f6.tar.bz2 |
Lazily allocate CastConfigDelegate to fix profile construction race.
Checking if the MediaRouter is enabled requires a Profile instance. This
check happens early in the initialization cycle, before the Profile has been
constructed. Instead, lazily construct the CastConfigDelegate instance so we
don't accidentally create two profiles at the same time.
BUG=574246
Review URL: https://codereview.chromium.org/1562923002
Cr-Commit-Position: refs/heads/master@{#368739}
Diffstat (limited to 'ash/system')
-rw-r--r-- | ash/system/tray/system_tray_delegate.cc | 2 | ||||
-rw-r--r-- | ash/system/tray/system_tray_delegate.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ash/system/tray/system_tray_delegate.cc b/ash/system/tray/system_tray_delegate.cc index fe081c0..b0228ec 100644 --- a/ash/system/tray/system_tray_delegate.cc +++ b/ash/system/tray/system_tray_delegate.cc @@ -222,7 +222,7 @@ bool SystemTrayDelegate::GetBluetoothDiscovering() { void SystemTrayDelegate::ChangeProxySettings() { } -CastConfigDelegate* SystemTrayDelegate::GetCastConfigDelegate() const { +CastConfigDelegate* SystemTrayDelegate::GetCastConfigDelegate() { return nullptr; } diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h index 1d2e0c2..df6ac0e 100644 --- a/ash/system/tray/system_tray_delegate.h +++ b/ash/system/tray/system_tray_delegate.h @@ -284,7 +284,7 @@ class ASH_EXPORT SystemTrayDelegate { virtual void ChangeProxySettings(); // Returns CastConfigDelegate. May return nullptr. - virtual CastConfigDelegate* GetCastConfigDelegate() const; + virtual CastConfigDelegate* GetCastConfigDelegate(); // Returns NetworkingConfigDelegate. May return nullptr. virtual NetworkingConfigDelegate* GetNetworkingConfigDelegate() const; |