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

Unified Diff: components/ntp_snippets/remote/ntp_snippets_status_service.cc

Issue 2520853002: [NTP] Cleanup: add brackets in components/ntp_snippets. [2/2] (Closed)
Patch Set: Created 4 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 | « components/ntp_snippets/features.cc ('k') | components/ntp_snippets/remote/remote_suggestions_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « components/ntp_snippets/features.cc ('k') | components/ntp_snippets/remote/remote_suggestions_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698