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

Side by Side Diff: chrome/installer/test/alternate_version_generator.cc

Issue 99923002: Move temp file functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/test/upgrade_test.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // The file contains the implementation of the mini_installer re-versioner. 5 // The file contains the implementation of the mini_installer re-versioner.
6 // The main function (GenerateNextVersion) does the following in a temp dir: 6 // The main function (GenerateNextVersion) does the following in a temp dir:
7 // - Extracts and unpacks setup.exe and the Chrome-bin folder from 7 // - Extracts and unpacks setup.exe and the Chrome-bin folder from
8 // mini_installer.exe. 8 // mini_installer.exe.
9 // - Inspects setup.exe to determine the current version. 9 // - Inspects setup.exe to determine the current version.
10 // - Runs through all .dll and .exe files: 10 // - Runs through all .dll and .exe files:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ScopedTempDirectory() { } 77 ScopedTempDirectory() { }
78 ~ScopedTempDirectory() { 78 ~ScopedTempDirectory() {
79 if (!directory_.empty() && !base::DeleteFile(directory_, true)) { 79 if (!directory_.empty() && !base::DeleteFile(directory_, true)) {
80 LOG(DFATAL) << "Failed deleting temporary directory \"" 80 LOG(DFATAL) << "Failed deleting temporary directory \""
81 << directory_.value() << "\""; 81 << directory_.value() << "\"";
82 } 82 }
83 } 83 }
84 // Creates a temporary directory. 84 // Creates a temporary directory.
85 bool Initialize() { 85 bool Initialize() {
86 DCHECK(directory_.empty()); 86 DCHECK(directory_.empty());
87 if (!file_util::CreateNewTempDirectory(&kTempDirPrefix[0], &directory_)) { 87 if (!base::CreateNewTempDirectory(&kTempDirPrefix[0], &directory_)) {
88 LOG(DFATAL) << "Failed creating temporary directory."; 88 LOG(DFATAL) << "Failed creating temporary directory.";
89 return false; 89 return false;
90 } 90 }
91 return true; 91 return true;
92 } 92 }
93 const base::FilePath& directory() const { 93 const base::FilePath& directory() const {
94 DCHECK(!directory_.empty()); 94 DCHECK(!directory_.empty());
95 return directory_; 95 return directory_;
96 } 96 }
97 97
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 return false; 692 return false;
693 } 693 }
694 ctx.current_version_str = ctx.current_version.ToString(); 694 ctx.current_version_str = ctx.current_version.ToString();
695 ctx.new_version = ChromeVersion::FromString(version.GetString()); 695 ctx.new_version = ChromeVersion::FromString(version.GetString());
696 ctx.new_version_str = ctx.new_version.ToString(); 696 ctx.new_version_str = ctx.new_version.ToString();
697 697
698 return UpdateVersionIfMatch(target_file, &ctx); 698 return UpdateVersionIfMatch(target_file, &ctx);
699 } 699 }
700 700
701 } // namespace upgrade_test 701 } // namespace upgrade_test
OLDNEW
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/test/upgrade_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698