Chromium Code Reviews| Index: components/ntp_snippets/remote/ntp_snippets_status_service.cc |
| diff --git a/components/ntp_snippets/remote/ntp_snippets_status_service.cc b/components/ntp_snippets/remote/ntp_snippets_status_service.cc |
| index 62514d270b101cc714a8169744ae08f4d88ccec1..4a265bc565d9893e7da41aecf42ba3857f4ef77d 100644 |
| --- a/components/ntp_snippets/remote/ntp_snippets_status_service.cc |
| +++ b/components/ntp_snippets/remote/ntp_snippets_status_service.cc |
| @@ -34,10 +34,12 @@ NTPSnippetsStatusService::NTPSnippetsStatusService( |
| kArticleSuggestionsFeature, kFetchingRequiresSignin); |
| if (param_value_str == kFetchingRequiresSigninEnabled) { |
| require_signin_ = true; |
| - } else if (!param_value_str.empty() && |
|
vitaliii
2016/11/21 08:50:49
We have not explicitly considered this case, but m
Marc Treib
2016/11/21 09:41:22
No, "else if" is a very common pattern, and I'd le
|
| - param_value_str != kFetchingRequiresSigninDisabled) { |
| - DLOG(WARNING) << "Unknow value for the variations parameter " |
| - << kFetchingRequiresSignin << ": " << param_value_str; |
| + } else { |
| + if (!param_value_str.empty() && |
| + param_value_str != kFetchingRequiresSigninDisabled) { |
| + DLOG(WARNING) << "Unknow value for the variations parameter " |
| + << kFetchingRequiresSignin << ": " << param_value_str; |
| + } |
| } |
| } |
| @@ -76,8 +78,9 @@ void NTPSnippetsStatusService::OnSnippetsEnabledChanged() { |
| void NTPSnippetsStatusService::OnStateChanged( |
| SnippetsStatus new_snippets_status) { |
| - if (new_snippets_status == snippets_status_) |
| + if (new_snippets_status == snippets_status_) { |
| return; |
| + } |
| snippets_status_change_callback_.Run(snippets_status_, new_snippets_status); |
| snippets_status_ = new_snippets_status; |