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

Unified Diff: chrome/browser/notifications/desktop_notification_service.cc

Issue 115353005: Introduces a CHECK to analyze the crash reason. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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 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/notifications/desktop_notification_service.cc
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index eecc9beb52b94540dde5e8f80df7b676af06ad5e..cc2a720f108746c026e8a9d6be04e563fd08c323 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -630,7 +630,10 @@ void DesktopNotificationService::ShowWelcomeNotificationIfNecessary(
void DesktopNotificationService::OnStringListPrefChanged(
const char* pref_name, std::set<std::string>* ids_field) {
ids_field->clear();
- const base::ListValue* pref_list = profile_->GetPrefs()->GetList(pref_name);
+ // Separate GetPrefs()->GetList() to analyze the crash. See crbug.com/322320
+ const PrefService* pref_service = profile_->GetPrefs();
+ CHECK(pref_service);
+ const base::ListValue* pref_list = pref_service->GetList(pref_name);
for (size_t i = 0; i < pref_list->GetSize(); ++i) {
std::string element;
if (pref_list->GetString(i, &element) && !element.empty())
« 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