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

Side by Side Diff: chrome/installer/setup/install.cc

Issue 1478273003: Add an installer crash key for the currently installed version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@installer_crash_keys_cmdline
Patch Set: Rebase Created 5 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
« no previous file with comments | « chrome/chrome_installer.gypi ('k') | chrome/installer/setup/installer_crash_reporting.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 "chrome/installer/setup/install.h" 5 #include "chrome/installer/setup/install.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <time.h> 9 #include <time.h>
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/numerics/safe_conversions.h" 17 #include "base/numerics/safe_conversions.h"
18 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
19 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
20 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "base/win/shortcut.h" 21 #include "base/win/shortcut.h"
22 #include "base/win/windows_version.h" 22 #include "base/win/windows_version.h"
23 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/installer/setup/install_worker.h" 25 #include "chrome/installer/setup/install_worker.h"
26 #include "chrome/installer/setup/installer_crash_reporting.h"
26 #include "chrome/installer/setup/setup_constants.h" 27 #include "chrome/installer/setup/setup_constants.h"
27 #include "chrome/installer/setup/setup_util.h" 28 #include "chrome/installer/setup/setup_util.h"
28 #include "chrome/installer/setup/update_active_setup_version_work_item.h" 29 #include "chrome/installer/setup/update_active_setup_version_work_item.h"
29 #include "chrome/installer/util/beacons.h" 30 #include "chrome/installer/util/beacons.h"
30 #include "chrome/installer/util/browser_distribution.h" 31 #include "chrome/installer/util/browser_distribution.h"
31 #include "chrome/installer/util/create_reg_key_work_item.h" 32 #include "chrome/installer/util/create_reg_key_work_item.h"
32 #include "chrome/installer/util/delete_after_reboot_helper.h" 33 #include "chrome/installer/util/delete_after_reboot_helper.h"
33 #include "chrome/installer/util/google_update_constants.h" 34 #include "chrome/installer/util/google_update_constants.h"
34 #include "chrome/installer/util/helper.h" 35 #include "chrome/installer/util/helper.h"
35 #include "chrome/installer/util/install_util.h" 36 #include "chrome/installer/util/install_util.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 const base::FilePath& archive_path, 181 const base::FilePath& archive_path,
181 const base::FilePath& src_path, 182 const base::FilePath& src_path,
182 const base::FilePath& temp_path, 183 const base::FilePath& temp_path,
183 const Version& new_version, 184 const Version& new_version,
184 scoped_ptr<Version>* current_version) { 185 scoped_ptr<Version>* current_version) {
185 DCHECK(current_version); 186 DCHECK(current_version);
186 187
187 installer_state.UpdateStage(installer::BUILDING); 188 installer_state.UpdateStage(installer::BUILDING);
188 189
189 current_version->reset(installer_state.GetCurrentVersion(original_state)); 190 current_version->reset(installer_state.GetCurrentVersion(original_state));
191 installer::SetCurrentVersionCrashKey(current_version->get());
192
190 scoped_ptr<WorkItemList> install_list(WorkItem::CreateWorkItemList()); 193 scoped_ptr<WorkItemList> install_list(WorkItem::CreateWorkItemList());
191 194
192 AddInstallWorkItems(original_state, 195 AddInstallWorkItems(original_state,
193 installer_state, 196 installer_state,
194 setup_path, 197 setup_path,
195 archive_path, 198 archive_path,
196 src_path, 199 src_path,
197 temp_path, 200 temp_path,
198 current_version->get(), 201 current_version->get(),
199 new_version, 202 new_version,
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 // Read master_preferences copied beside chrome.exe at install. 675 // Read master_preferences copied beside chrome.exe at install.
673 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); 676 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs));
674 base::FilePath chrome_exe(installation_root.Append(kChromeExe)); 677 base::FilePath chrome_exe(installation_root.Append(kChromeExe));
675 CreateOrUpdateShortcuts( 678 CreateOrUpdateShortcuts(
676 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); 679 chrome_exe, chrome, prefs, CURRENT_USER, install_operation);
677 680
678 UpdateDefaultBrowserBeaconForPath(chrome_exe); 681 UpdateDefaultBrowserBeaconForPath(chrome_exe);
679 } 682 }
680 683
681 } // namespace installer 684 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/chrome_installer.gypi ('k') | chrome/installer/setup/installer_crash_reporting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698