Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Side by Side Diff: chrome/browser/chrome_browser_main_win.cc

Issue 11421141: On Chrome uninstall, if App Launcher is installed, then hide the "Also delete your browser data?" c… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Making the caller of ShowUninstallBrowserPrompt() decide whether or not to show checkbox. Created 8 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 | « no previous file | chrome/browser/ui/uninstall_browser_prompt.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/browser/chrome_browser_main_win.h" 5 #include "chrome/browser/chrome_browser_main_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 16 matching lines...) Expand all
27 #include "chrome/browser/profiles/profile_info_cache.h" 27 #include "chrome/browser/profiles/profile_info_cache.h"
28 #include "chrome/browser/profiles/profile_shortcut_manager.h" 28 #include "chrome/browser/profiles/profile_shortcut_manager.h"
29 #include "chrome/browser/shell_integration.h" 29 #include "chrome/browser/shell_integration.h"
30 #include "chrome/browser/system_monitor/removable_device_notifications_window_wi n.h" 30 #include "chrome/browser/system_monitor/removable_device_notifications_window_wi n.h"
31 #include "chrome/browser/ui/simple_message_box.h" 31 #include "chrome/browser/ui/simple_message_box.h"
32 #include "chrome/browser/ui/uninstall_browser_prompt.h" 32 #include "chrome/browser/ui/uninstall_browser_prompt.h"
33 #include "chrome/common/chrome_constants.h" 33 #include "chrome/common/chrome_constants.h"
34 #include "chrome/common/chrome_result_codes.h" 34 #include "chrome/common/chrome_result_codes.h"
35 #include "chrome/common/chrome_switches.h" 35 #include "chrome/common/chrome_switches.h"
36 #include "chrome/common/env_vars.h" 36 #include "chrome/common/env_vars.h"
37 #include "chrome/installer/launcher_support/chrome_launcher_support.h"
37 #include "chrome/installer/util/browser_distribution.h" 38 #include "chrome/installer/util/browser_distribution.h"
38 #include "chrome/installer/util/helper.h" 39 #include "chrome/installer/util/helper.h"
39 #include "chrome/installer/util/install_util.h" 40 #include "chrome/installer/util/install_util.h"
40 #include "chrome/installer/util/l10n_string_util.h" 41 #include "chrome/installer/util/l10n_string_util.h"
41 #include "chrome/installer/util/shell_util.h" 42 #include "chrome/installer/util/shell_util.h"
42 #include "content/public/common/main_function_params.h" 43 #include "content/public/common/main_function_params.h"
43 #include "grit/app_locale_settings.h" 44 #include "grit/app_locale_settings.h"
44 #include "grit/chromium_strings.h" 45 #include "grit/chromium_strings.h"
45 #include "grit/generated_resources.h" 46 #include "grit/generated_resources.h"
46 #include "installer_util_strings/installer_util_strings.h" 47 #include "installer_util_strings/installer_util_strings.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 int DoUninstallTasks(bool chrome_still_running) { 116 int DoUninstallTasks(bool chrome_still_running) {
116 // We want to show a warning to user (and exit) if Chrome is already running 117 // We want to show a warning to user (and exit) if Chrome is already running
117 // *before* we show the uninstall confirmation dialog box. But while the 118 // *before* we show the uninstall confirmation dialog box. But while the
118 // uninstall confirmation dialog is up, user might start Chrome, so we 119 // uninstall confirmation dialog is up, user might start Chrome, so we
119 // check once again after user acknowledges Uninstall dialog. 120 // check once again after user acknowledges Uninstall dialog.
120 if (chrome_still_running) { 121 if (chrome_still_running) {
121 ShowCloseBrowserFirstMessageBox(); 122 ShowCloseBrowserFirstMessageBox();
122 return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE; 123 return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE;
123 } 124 }
124 int result = chrome::ShowUninstallBrowserPrompt(); 125 int result = chrome::ShowUninstallBrowserPrompt(
126 !chrome_launcher_support::IsAppLauncherPresent());
erikwright (departed) 2012/11/30 16:39:01 // Don't offer to delete the profile if the launch
huangs 2012/12/02 06:41:13 Done.
125 if (browser_util::IsBrowserAlreadyRunning()) { 127 if (browser_util::IsBrowserAlreadyRunning()) {
126 ShowCloseBrowserFirstMessageBox(); 128 ShowCloseBrowserFirstMessageBox();
127 return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE; 129 return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE;
128 } 130 }
129 131
130 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { 132 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) {
131 // The following actions are just best effort. 133 // The following actions are just best effort.
132 VLOG(1) << "Executing uninstall actions"; 134 VLOG(1) << "Executing uninstall actions";
133 if (!first_run::RemoveSentinel()) 135 if (!first_run::RemoveSentinel())
134 VLOG(1) << "Failed to delete sentinel file."; 136 VLOG(1) << "Failed to delete sentinel file.";
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 if (resource_id) 388 if (resource_id)
387 return l10n_util::GetStringUTF16(resource_id); 389 return l10n_util::GetStringUTF16(resource_id);
388 return string16(); 390 return string16();
389 } 391 }
390 392
391 // static 393 // static
392 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 394 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
393 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 395 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
394 installer::SetTranslationDelegate(&delegate); 396 installer::SetTranslationDelegate(&delegate);
395 } 397 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/uninstall_browser_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698