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

Side by Side Diff: base/file_util_win.cc

Issue 9354: Spelling fix (r4652) (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #include <time.h> 10 #include <time.h>
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 451
452 bool CreateDirectory(const FilePath& full_path) { 452 bool CreateDirectory(const FilePath& full_path) {
453 if (DirectoryExists(full_path)) 453 if (DirectoryExists(full_path))
454 return true; 454 return true;
455 int err = SHCreateDirectoryEx(NULL, full_path.value().c_str(), NULL); 455 int err = SHCreateDirectoryEx(NULL, full_path.value().c_str(), NULL);
456 return err == ERROR_SUCCESS; 456 return err == ERROR_SUCCESS;
457 } 457 }
458 458
459 bool GetFileInfo(const FilePath& file_path, FileInfo* results) { 459 bool GetFileInfo(const FilePath& file_path, FileInfo* results) {
460 WIN32_FILE_ATTRIBUTE_DATA attr; 460 WIN32_FILE_ATTRIBUTE_DATA attr;
461 if (!GetFileAttributesEx(file_path.ToWstringHack().c_str(), GetFileExInfoStand ard, &attr)) 461 if (!GetFileAttributesEx(file_path.ToWStringHack().c_str(),
462 GetFileExInfoStandard, &attr)) {
462 return false; 463 return false;
464 }
463 465
464 ULARGE_INTEGER size; 466 ULARGE_INTEGER size;
465 size.HighPart = attr.nFileSizeHigh; 467 size.HighPart = attr.nFileSizeHigh;
466 size.LowPart = attr.nFileSizeLow; 468 size.LowPart = attr.nFileSizeLow;
467 results->size = size.QuadPart; 469 results->size = size.QuadPart;
468 470
469 results->is_directory = 471 results->is_directory =
470 (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; 472 (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
471 return true; 473 return true;
472 } 474 }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 // it to pending_paths_ so we scan it after we finish scanning this 681 // it to pending_paths_ so we scan it after we finish scanning this
680 // directory. 682 // directory.
681 pending_paths_.push(cur_file); 683 pending_paths_.push(cur_file);
682 } 684 }
683 return (file_type_ & FileEnumerator::DIRECTORIES) ? cur_file : Next(); 685 return (file_type_ & FileEnumerator::DIRECTORIES) ? cur_file : Next();
684 } 686 }
685 return (file_type_ & FileEnumerator::FILES) ? cur_file : Next(); 687 return (file_type_ & FileEnumerator::FILES) ? cur_file : Next();
686 } 688 }
687 689
688 } // namespace file_util 690 } // namespace file_util
OLDNEW
« 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