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

Side by Side Diff: components/ntp_snippets/ntp_snippets_status_service.cc

Issue 2368583002: [NTP Snippets] Cleanups from clang-tidy (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/ntp_snippets/ntp_snippets_status_service.h" 5 #include "components/ntp_snippets/ntp_snippets_status_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "components/ntp_snippets/features.h" 9 #include "components/ntp_snippets/features.h"
10 #include "components/ntp_snippets/pref_names.h" 10 #include "components/ntp_snippets/pref_names.h"
(...skipping 23 matching lines...) Expand all
34 kArticleSuggestionsFeature, kFetchingRequiresSignin); 34 kArticleSuggestionsFeature, kFetchingRequiresSignin);
35 if (param_value_str == kFetchingRequiresSigninEnabled) { 35 if (param_value_str == kFetchingRequiresSigninEnabled) {
36 require_signin_ = true; 36 require_signin_ = true;
37 } else if (!param_value_str.empty() && 37 } else if (!param_value_str.empty() &&
38 param_value_str != kFetchingRequiresSigninDisabled) { 38 param_value_str != kFetchingRequiresSigninDisabled) {
39 DLOG(WARNING) << "Unknow value for the variations parameter " 39 DLOG(WARNING) << "Unknow value for the variations parameter "
40 << kFetchingRequiresSignin << ": " << param_value_str; 40 << kFetchingRequiresSignin << ": " << param_value_str;
41 } 41 }
42 } 42 }
43 43
44 NTPSnippetsStatusService::~NTPSnippetsStatusService() {} 44 NTPSnippetsStatusService::~NTPSnippetsStatusService() = default;
45 45
46 // static 46 // static
47 void NTPSnippetsStatusService::RegisterProfilePrefs( 47 void NTPSnippetsStatusService::RegisterProfilePrefs(
48 PrefRegistrySimple* registry) { 48 PrefRegistrySimple* registry) {
49 registry->RegisterBooleanPref(prefs::kEnableSnippets, true); 49 registry->RegisterBooleanPref(prefs::kEnableSnippets, true);
50 } 50 }
51 51
52 void NTPSnippetsStatusService::Init( 52 void NTPSnippetsStatusService::Init(
53 const DisabledReasonChangeCallback& callback) { 53 const DisabledReasonChangeCallback& callback) {
54 DCHECK(disabled_reason_change_callback_.is_null()); 54 DCHECK(disabled_reason_change_callback_.is_null());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 (!signin_manager_ || !signin_manager_->IsAuthenticated())) { 106 (!signin_manager_ || !signin_manager_->IsAuthenticated())) {
107 DVLOG(1) << "[GetNewDisabledReason] Signed out"; 107 DVLOG(1) << "[GetNewDisabledReason] Signed out";
108 return DisabledReason::SIGNED_OUT; 108 return DisabledReason::SIGNED_OUT;
109 } 109 }
110 110
111 DVLOG(1) << "[GetNewDisabledReason] Enabled"; 111 DVLOG(1) << "[GetNewDisabledReason] Enabled";
112 return DisabledReason::NONE; 112 return DisabledReason::NONE;
113 } 113 }
114 114
115 } // namespace ntp_snippets 115 } // namespace ntp_snippets
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698