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

Unified Diff: net/url_request/url_request_file_dir_job.cc

Issue 10942004: Cleanup: avoid foo ? true : false, part 2. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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: net/url_request/url_request_file_dir_job.cc
===================================================================
--- net/url_request/url_request_file_dir_job.cc (revision 157289)
+++ net/url_request/url_request_file_dir_job.cc (working copy)
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
-#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
@@ -67,7 +66,7 @@
}
bool URLRequestFileDirJob::ReadRawData(IOBuffer* buf, int buf_size,
- int *bytes_read) {
+ int* bytes_read) {
DCHECK(bytes_read);
*bytes_read = 0;
@@ -124,11 +123,11 @@
// ICU's datetime formatting APIs expect time in UTC and take into account
// the timezone before formatting.
data_.append(GetDirectoryListingEntry(
- data.info.cFileName, std::string(),
- (data.info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? true : false,
+ data.info.cFileName,
+ std::string(),
+ ((data.info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0),
size,
base::Time::FromFileTime(data.info.ftLastWriteTime)));
-
#elif defined(OS_POSIX)
// TOOD(jungshik): The same issue as for the directory name.
data_.append(GetDirectoryListingEntry(
@@ -176,8 +175,8 @@
}
}
-bool URLRequestFileDirJob::FillReadBuffer(char *buf, int buf_size,
- int *bytes_read) {
+bool URLRequestFileDirJob::FillReadBuffer(char* buf, int buf_size,
+ int* bytes_read) {
DCHECK(bytes_read);
*bytes_read = 0;
« no previous file with comments | « net/http/http_response_info.cc ('k') | ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_font_rpc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698