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

Unified Diff: chrome/browser/drive/drive_api_util.cc

Issue 905723004: Files.app: Rename a variable in drive_api_util.cc for more sanity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/drive/drive_api_util.cc
diff --git a/chrome/browser/drive/drive_api_util.cc b/chrome/browser/drive/drive_api_util.cc
index d23a78265b186f83eb63269a0b88e7aaf8570a37..8d153877411a4b0b66f09fbd95d3b4b026d49bcb 100644
--- a/chrome/browser/drive/drive_api_util.cc
+++ b/chrome/browser/drive/drive_api_util.cc
@@ -192,12 +192,12 @@ void FileStreamMd5Digester::ReadNextChunk() {
OnChunkRead(result);
}
-void FileStreamMd5Digester::OnChunkRead(int result) {
- if (result < 0) {
+void FileStreamMd5Digester::OnChunkRead(int bytesRead) {
mtomasz 2015/02/25 02:36:30 nit: bytes_read.
+ if (bytesRead < 0) {
// Error - just return empty string.
callback_.Run("");
return;
- } else if (result == 0) {
+ } else if (bytesRead == 0) {
// EOF.
base::MD5Digest digest;
base::MD5Final(&digest, &md5_context_);
@@ -207,7 +207,7 @@ void FileStreamMd5Digester::OnChunkRead(int result) {
}
// Read data and digest it.
- base::MD5Update(&md5_context_, base::StringPiece(buffer_->data(), result));
+ base::MD5Update(&md5_context_, base::StringPiece(buffer_->data(), bytesRead));
// Kick off the next read.
ReadNextChunk();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698