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

Side by Side Diff: base/file_util_win.cc

Issue 16522: Unbreak unit tests. Revert r7564. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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.cc ('k') | chrome/browser/automation/automation_provider.cc » ('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) 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 ::CloseHandle(file_mapping_); 732 ::CloseHandle(file_mapping_);
733 if (file_ != INVALID_HANDLE_VALUE) 733 if (file_ != INVALID_HANDLE_VALUE)
734 ::CloseHandle(file_); 734 ::CloseHandle(file_);
735 735
736 data_ = NULL; 736 data_ = NULL;
737 file_mapping_ = file_ = INVALID_HANDLE_VALUE; 737 file_mapping_ = file_ = INVALID_HANDLE_VALUE;
738 length_ = INVALID_FILE_SIZE; 738 length_ = INVALID_FILE_SIZE;
739 } 739 }
740 740
741 // Deprecated functions ---------------------------------------------------- 741 // Deprecated functions ----------------------------------------------------
742
743 void InsertBeforeExtension(std::wstring* path_str, 742 void InsertBeforeExtension(std::wstring* path_str,
744 const std::wstring& suffix) { 743 const std::wstring& suffix) {
745 FilePath path(*path_str); 744 FilePath path(*path_str);
746 InsertBeforeExtension(&path, suffix); 745 InsertBeforeExtension(&path, suffix);
747 path_str->assign(path.value()); 746 path_str->assign(path.value());
748 } 747 }
749 void PathComponents(const std::wstring& path, 748 void PathComponents(const std::wstring& path,
750 std::vector<std::wstring>* components) { 749 std::vector<std::wstring>* components) {
751 PathComponents(FilePath(path), components); 750 PathComponents(FilePath(path), components);
752 } 751 }
753 void ReplaceExtension(std::wstring* file_name, const std::wstring& extension) { 752 void ReplaceExtension(std::wstring* file_name, const std::wstring& extension) {
754 FilePath path(*file_name); 753 FilePath path(*file_name);
755 ReplaceExtension(&path, extension); 754 ReplaceExtension(&path, extension);
756 file_name->assign(path.value()); 755 file_name->assign(path.value());
757 } 756 }
758 } // namespace file_util 757 } // namespace file_util
OLDNEW
« no previous file with comments | « base/file_util.cc ('k') | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698