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

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

Issue 11413029: Uninstall Chrome + has App Host + not App Launcher => Uninstall App Host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing comments; cleanups; checking current level instead of forced user level. Created 8 years, 1 month 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
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 #include <winuser.h> 10 #include <winuser.h>
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 // Returns the appropriate shortcut operations for App Launcher, 289 // Returns the appropriate shortcut operations for App Launcher,
290 // based on state of installation and master_preferences. 290 // based on state of installation and master_preferences.
291 installer::InstallShortcutOperation GetAppLauncherShortcutOperation( 291 installer::InstallShortcutOperation GetAppLauncherShortcutOperation(
292 const InstallationState& original_state, 292 const InstallationState& original_state,
293 const InstallerState& installer_state) { 293 const InstallerState& installer_state) {
294 const installer::ProductState* original_app_host_state = 294 const installer::ProductState* original_app_host_state =
295 original_state.GetProductState(installer_state.system_install(), 295 original_state.GetProductState(installer_state.system_install(),
296 BrowserDistribution::CHROME_APP_HOST); 296 BrowserDistribution::CHROME_APP_HOST);
297 bool app_launcher_exists = original_app_host_state && 297 bool app_launcher_exists = original_app_host_state &&
298 CommandLine(original_app_host_state->uninstall_command()) 298 original_app_host_state->uninstall_command()
299 .HasSwitch(installer::switches::kChromeAppLauncher); 299 .HasSwitch(installer::switches::kChromeAppLauncher);
300 if (!app_launcher_exists) 300 if (!app_launcher_exists)
301 return installer::INSTALL_SHORTCUT_CREATE_ALL; 301 return installer::INSTALL_SHORTCUT_CREATE_ALL;
302 302
303 return installer::INSTALL_SHORTCUT_REPLACE_EXISTING; 303 return installer::INSTALL_SHORTCUT_REPLACE_EXISTING;
304 } 304 }
305 305
306 } // end namespace 306 } // end namespace
307 307
308 namespace installer { 308 namespace installer {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL); 684 INSTALL_SHORTCUT_CREATE_EACH_IF_NO_SYSTEM_LEVEL);
685 685
686 // Read master_preferences copied beside chrome.exe at install. 686 // Read master_preferences copied beside chrome.exe at install.
687 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs)); 687 MasterPreferences prefs(installation_root.AppendASCII(kDefaultMasterPrefs));
688 FilePath chrome_exe(installation_root.Append(kChromeExe)); 688 FilePath chrome_exe(installation_root.Append(kChromeExe));
689 CreateOrUpdateShortcuts( 689 CreateOrUpdateShortcuts(
690 chrome_exe, chrome, prefs, CURRENT_USER, install_operation); 690 chrome_exe, chrome, prefs, CURRENT_USER, install_operation);
691 } 691 }
692 692
693 } // namespace installer 693 } // namespace installer
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/util/installer_state.cc » ('j') | chrome/installer/util/installer_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698