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

Unified Diff: chrome/browser/chromeos/arc/arc_settings_service.cc

Issue 2384333003: Fixed nullptr default network crash. (Closed)
Patch Set: Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_settings_service_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_settings_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_settings_service.cc b/chrome/browser/chromeos/arc/arc_settings_service.cc
index cf9e79a157b30e0e3b91eaab4e670d8237a1d3c0..e22e010e12280c4f98854ac0d8c8ae8c948ef456 100644
--- a/chrome/browser/chromeos/arc/arc_settings_service.cc
+++ b/chrome/browser/chromeos/arc/arc_settings_service.cc
@@ -476,9 +476,9 @@ void ArcSettingsServiceImpl::DefaultNetworkChanged(
// kProxy pref and ONC policy have more priority than the default network
// update.
Profile* profile = ProfileManager::GetActiveUserProfile();
- if (!chromeos::onc::HasPolicyForNetwork(
- profile->GetPrefs(), g_browser_process->local_state(), *network) &&
- !IsPrefProxyConfigApplied()) {
+ if (network && !IsPrefProxyConfigApplied() &&
+ !chromeos::onc::HasPolicyForNetwork(
+ profile->GetPrefs(), g_browser_process->local_state(), *network)) {
SyncProxySettings();
}
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_settings_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698