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

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

Issue 2459583002: Use InstallDetails in setup. (Closed)
Patch Set: another doc comment Created 3 years, 10 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
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 // This file contains the definitions of the installer functions that build 5 // This file contains the definitions of the installer functions that build
6 // the WorkItemList used to install the application. 6 // the WorkItemList used to install the application.
7 7
8 #include "chrome/installer/setup/install_worker.h" 8 #include "chrome/installer/setup/install_worker.h"
9 9
10 #include <windows.h> // NOLINT 10 #include <windows.h> // NOLINT
11 #include <atlsecurity.h> 11 #include <atlsecurity.h>
12 #include <oaidl.h> 12 #include <oaidl.h>
13 #include <shlobj.h> 13 #include <shlobj.h>
14 #include <stddef.h> 14 #include <stddef.h>
15 #include <stdint.h> 15 #include <stdint.h>
16 #include <time.h> 16 #include <time.h>
17 17
18 #include <memory> 18 #include <memory>
19 #include <vector> 19 #include <vector>
20 20
21 #include "base/bind.h" 21 #include "base/bind.h"
22 #include "base/command_line.h" 22 #include "base/command_line.h"
23 #include "base/files/file_path.h" 23 #include "base/files/file_path.h"
24 #include "base/files/file_util.h" 24 #include "base/files/file_util.h"
25 #include "base/logging.h" 25 #include "base/logging.h"
26 #include "base/strings/string_util.h" 26 #include "base/strings/string_util.h"
27 #include "base/strings/utf_string_conversions.h" 27 #include "base/strings/utf_string_conversions.h"
28 #include "base/version.h" 28 #include "base/version.h"
29 #include "base/win/registry.h" 29 #include "base/win/registry.h"
30 #include "chrome/install_static/install_details.h"
30 #include "chrome/installer/setup/installer_state.h" 31 #include "chrome/installer/setup/installer_state.h"
31 #include "chrome/installer/setup/persistent_histogram_storage.h" 32 #include "chrome/installer/setup/persistent_histogram_storage.h"
32 #include "chrome/installer/setup/setup_constants.h" 33 #include "chrome/installer/setup/setup_constants.h"
33 #include "chrome/installer/setup/setup_util.h" 34 #include "chrome/installer/setup/setup_util.h"
34 #include "chrome/installer/setup/update_active_setup_version_work_item.h" 35 #include "chrome/installer/setup/update_active_setup_version_work_item.h"
35 #include "chrome/installer/util/app_registration_data.h" 36 #include "chrome/installer/util/app_registration_data.h"
36 #include "chrome/installer/util/browser_distribution.h" 37 #include "chrome/installer/util/browser_distribution.h"
37 #include "chrome/installer/util/callback_work_item.h" 38 #include "chrome/installer/util/callback_work_item.h"
38 #include "chrome/installer/util/conditional_work_item_list.h" 39 #include "chrome/installer/util/conditional_work_item_list.h"
39 #include "chrome/installer/util/create_reg_key_work_item.h" 40 #include "chrome/installer/util/create_reg_key_work_item.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 return false; 329 return false;
329 } 330 }
330 331
331 return true; 332 return true;
332 } 333 }
333 334
334 // Migrates consent for the collection of usage statistics from the binaries to 335 // Migrates consent for the collection of usage statistics from the binaries to
335 // Chrome when migrating multi-install Chrome to single-install. 336 // Chrome when migrating multi-install Chrome to single-install.
336 void AddMigrateUsageStatsWorkItems(const InstallerState& installer_state, 337 void AddMigrateUsageStatsWorkItems(const InstallerState& installer_state,
337 WorkItemList* install_list) { 338 WorkItemList* install_list) {
338 // This operation doesn't apply to SxS Chrome. 339 // This operation only applies to modes that once supported multi-install.
339 if (InstallUtil::IsChromeSxSProcess()) 340 if (install_static::InstallDetails::Get().supported_multi_install())
340 return; 341 return;
341 342
342 // Bail out if an existing multi-install Chrome is not being migrated to 343 // Bail out if an existing multi-install Chrome is not being migrated to
343 // single-install. 344 // single-install.
344 if (!installer_state.is_migrating_to_single()) 345 if (!installer_state.is_migrating_to_single())
345 return; 346 return;
346 347
347 // Nothing to do if the binaries aren't actually installed. 348 // Nothing to do if the binaries aren't actually installed.
348 if (!AreBinariesInstalled(installer_state)) 349 if (!AreBinariesInstalled(installer_state))
349 return; 350 return;
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 // Log everything for now. 898 // Log everything for now.
898 cmd_line.AppendSwitch(installer::switches::kVerboseLogging); 899 cmd_line.AppendSwitch(installer::switches::kVerboseLogging);
899 900
900 AppCommand cmd(cmd_line.GetCommandLineString()); 901 AppCommand cmd(cmd_line.GetCommandLineString());
901 cmd.set_is_auto_run_on_os_upgrade(true); 902 cmd.set_is_auto_run_on_os_upgrade(true);
902 cmd.AddWorkItems(installer_state.root_key(), cmd_key, install_list); 903 cmd.AddWorkItems(installer_state.root_key(), cmd_key, install_list);
903 } 904 }
904 } 905 }
905 906
906 } // namespace installer 907 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_unittest.cc ('k') | chrome/installer/setup/install_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698