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

Unified Diff: components/rappor/log_uploader.cc

Issue 188103004: C++ Readability review for holte (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix struct/class declaration Created 6 years, 9 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
« no previous file with comments | « components/rappor/log_uploader.h ('k') | components/rappor/log_uploader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/log_uploader.cc
diff --git a/components/rappor/log_uploader.cc b/components/rappor/log_uploader.cc
index 4837ba192084a2bde5574df94ecf00230e05012f..ead1a973957cfc065c29da547b52d8f42ab0c34a 100644
--- a/components/rappor/log_uploader.cc
+++ b/components/rappor/log_uploader.cc
@@ -102,12 +102,12 @@ void LogUploader::OnURLFetchComplete(const net::URLFetcher* source) {
DCHECK_EQ(current_fetch_.get(), source);
scoped_ptr<net::URLFetcher> fetch(current_fetch_.Pass());
- int response_code = source->GetResponseCode();
+ const int response_code = source->GetResponseCode();
// Log a histogram to track response success vs. failure rates.
UMA_HISTOGRAM_SPARSE_SLOWLY("Rappor.UploadResponseCode", response_code);
- bool upload_succeeded = response_code == 200;
+ const bool upload_succeeded = response_code == 200;
// Determine whether this log should be retransmitted.
DiscardReason reason = NUM_DISCARD_REASONS;
@@ -128,7 +128,7 @@ void LogUploader::OnURLFetchComplete(const net::URLFetcher* source) {
// Error 400 indicates a problem with the log, not with the server, so
// don't consider that a sign that the server is in trouble.
- bool server_is_healthy = upload_succeeded || response_code == 400;
+ const bool server_is_healthy = upload_succeeded || response_code == 400;
OnUploadFinished(server_is_healthy, !queued_logs_.empty());
}
« no previous file with comments | « components/rappor/log_uploader.h ('k') | components/rappor/log_uploader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698