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

Side by Side Diff: base/file_util.cc

Issue 9691059: Cleanup: Remove remaining deprecated file_util functions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_util.h ('k') | base/file_util_deprecated.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/file_util.h" 5 #include "base/file_util.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <io.h> 8 #include <io.h>
9 #endif 9 #endif
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 NULL, NULL); 373 NULL, NULL);
374 374
375 if (file_ == base::kInvalidPlatformFileValue) { 375 if (file_ == base::kInvalidPlatformFileValue) {
376 DLOG(ERROR) << "Couldn't open " << file_name.value(); 376 DLOG(ERROR) << "Couldn't open " << file_name.value();
377 return false; 377 return false;
378 } 378 }
379 379
380 return MapFileToMemoryInternal(); 380 return MapFileToMemoryInternal();
381 } 381 }
382 382
383 // Deprecated functions ----------------------------------------------------
384
385 #if defined(OS_WIN)
386 FILE* OpenFile(const std::wstring& filename, const char* mode) {
387 return OpenFile(FilePath::FromWStringHack(filename), mode);
388 }
389 int ReadFile(const std::wstring& filename, char* data, int size) {
390 return ReadFile(FilePath::FromWStringHack(filename), data, size);
391 }
392 int WriteFile(const std::wstring& filename, const char* data, int size) {
393 return WriteFile(FilePath::FromWStringHack(filename), data, size);
394 }
395 #endif // OS_WIN
396
397 /////////////////////////////////////////////// 383 ///////////////////////////////////////////////
398 // FileEnumerator 384 // FileEnumerator
399 // 385 //
400 // Note: the main logic is in file_util_<platform>.cc 386 // Note: the main logic is in file_util_<platform>.cc
401 387
402 bool FileEnumerator::ShouldSkip(const FilePath& path) { 388 bool FileEnumerator::ShouldSkip(const FilePath& path) {
403 FilePath::StringType basename = path.BaseName().value(); 389 FilePath::StringType basename = path.BaseName().value();
404 return IsDot(path) || (IsDotDot(path) && !(INCLUDE_DOT_DOT & file_type_)); 390 return IsDot(path) || (IsDotDot(path) && !(INCLUDE_DOT_DOT & file_type_));
405 } 391 }
406 392
407 } // namespace 393 } // namespace
OLDNEW
« no previous file with comments | « base/file_util.h ('k') | base/file_util_deprecated.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698