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

Unified Diff: components/ntp_snippets/ntp_snippets_fetcher.cc

Issue 2368583002: [NTP Snippets] Cleanups from clang-tidy (Closed)
Patch Set: rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/ntp_snippets_fetcher.cc
diff --git a/components/ntp_snippets/ntp_snippets_fetcher.cc b/components/ntp_snippets/ntp_snippets_fetcher.cc
index 3ac6c735f077dd8e6ba32e733d2488e83c5ef7f0..f494a974654d538a4a3ef290e5b1526be44f3771 100644
--- a/components/ntp_snippets/ntp_snippets_fetcher.cc
+++ b/components/ntp_snippets/ntp_snippets_fetcher.cc
@@ -4,7 +4,7 @@
#include "components/ntp_snippets/ntp_snippets_fetcher.h"
-#include <stdlib.h>
+#include <cstdlib>
#include "base/command_line.h"
#include "base/files/file_path.h"
@@ -125,11 +125,12 @@ std::string GetFetchEndpoint() {
}
bool UsesChromeContentSuggestionsAPI(const GURL& endpoint) {
- if (endpoint == GURL(kChromeReaderServer)) {
+ if (endpoint == GURL(kChromeReaderServer))
return false;
- } else if (endpoint != GURL(kContentSuggestionsServer) &&
- endpoint != GURL(kContentSuggestionsDevServer) &&
- endpoint != GURL(kContentSuggestionsAlphaServer)) {
+
+ if (endpoint != GURL(kContentSuggestionsServer) &&
+ endpoint != GURL(kContentSuggestionsDevServer) &&
+ endpoint != GURL(kContentSuggestionsAlphaServer)) {
LOG(WARNING) << "Unknown value for " << kContentSuggestionsBackend << ": "
<< "assuming chromecontentsuggestions-style API";
}
@@ -195,9 +196,10 @@ NTPSnippetsFetcher::NTPSnippetsFetcher(
signin_manager_(signin_manager),
token_service_(token_service),
waiting_for_refresh_token_(false),
- url_request_context_getter_(url_request_context_getter),
+ url_request_context_getter_(std::move(url_request_context_getter)),
category_factory_(category_factory),
parse_json_callback_(parse_json_callback),
+ count_to_fetch_(0),
fetch_url_(GetFetchEndpoint()),
fetch_api_(UsesChromeContentSuggestionsAPI(fetch_url_)
? CHROME_CONTENT_SUGGESTIONS_API
« no previous file with comments | « components/ntp_snippets/ntp_snippets_fetcher.h ('k') | components/ntp_snippets/ntp_snippets_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698