| OLD | NEW |
| 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 #include <windows.h> | 5 #include <windows.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "chrome/installer/util/logging_installer.h" | 8 #include "chrome/installer/util/logging_installer.h" |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 installer_logging_ = false; | 108 installer_logging_ = false; |
| 109 } | 109 } |
| 110 | 110 |
| 111 base::FilePath GetLogFilePath(const installer::MasterPreferences& prefs) { | 111 base::FilePath GetLogFilePath(const installer::MasterPreferences& prefs) { |
| 112 std::string path; | 112 std::string path; |
| 113 prefs.GetString(installer::master_preferences::kLogFile, &path); | 113 prefs.GetString(installer::master_preferences::kLogFile, &path); |
| 114 if (!path.empty()) | 114 if (!path.empty()) |
| 115 return base::FilePath(base::UTF8ToWide(path)); | 115 return base::FilePath(base::UTF8ToWide(path)); |
| 116 | 116 |
| 117 static const base::FilePath::CharType kLogFilename[] = | 117 static const base::FilePath::CharType kLogFilename[] = |
| 118 #if defined(GOOGLE_CHROME_BUILD) |
| 118 FILE_PATH_LITERAL("chrome_installer.log"); | 119 FILE_PATH_LITERAL("chrome_installer.log"); |
| 120 #else // CHROMIUM_BUILD |
| 121 FILE_PATH_LITERAL("chromium_installer.log"); |
| 122 #endif |
| 119 | 123 |
| 120 // Fallback to current directory if getting the temp directory fails. | 124 // Fallback to current directory if getting the temp directory fails. |
| 121 base::FilePath tmp_path; | 125 base::FilePath tmp_path; |
| 122 ignore_result(PathService::Get(base::DIR_TEMP, &tmp_path)); | 126 ignore_result(PathService::Get(base::DIR_TEMP, &tmp_path)); |
| 123 return tmp_path.Append(kLogFilename); | 127 return tmp_path.Append(kLogFilename); |
| 124 } | 128 } |
| 125 | 129 |
| 126 } // namespace installer | 130 } // namespace installer |
| OLD | NEW |