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

Unified Diff: chrome/browser/google/google_brand_chromeos.cc

Issue 703623005: cros: Fix unit_tests crashes in GetBrand() on official builders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_brand_chromeos.cc
diff --git a/chrome/browser/google/google_brand_chromeos.cc b/chrome/browser/google/google_brand_chromeos.cc
index 3ef3374c944d17cc5b3c21e9085c83055846967a..8ccec25a6a292428af1c466227b473f48c4ad1aa 100644
--- a/chrome/browser/google/google_brand_chromeos.cc
+++ b/chrome/browser/google/google_brand_chromeos.cc
@@ -59,7 +59,9 @@ std::string GetBrand() {
content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
if (g_brand_empty)
return std::string();
- DCHECK(g_browser_process->local_state());
+ // Unit tests do not have prefs.
+ if (!g_browser_process->local_state())
+ return std::string();
return g_browser_process->local_state()->GetString(prefs::kRLZBrand);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698