[email protected] | e3c0bc2 | 2012-02-24 01:34:15 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 502e3961 | 2011-03-26 01:36:28 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
| 6 | |
[email protected] | 0d9a1da8 | 2013-03-14 21:52:07 | [diff] [blame] | 7 | #include "base/bind.h" |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 8 | #include "base/bind_helpers.h" |
rdevlin.cronin | 4f01c5f1 | 2015-05-07 17:52:00 | [diff] [blame] | 9 | #include "base/metrics/histogram_macros.h" |
[email protected] | 226d79ad | 2014-03-14 21:34:57 | [diff] [blame] | 10 | #include "base/strings/utf_string_conversions.h" |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 11 | #include "chrome/browser/extensions/chrome_app_icon_service.h" |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 12 | #include "chrome/browser/extensions/extension_service.h" |
[email protected] | 7eb20e3 | 2014-04-30 08:50:56 | [diff] [blame] | 13 | #include "chrome/browser/extensions/extension_util.h" |
[email protected] | 472522b | 2013-10-25 00:41:28 | [diff] [blame] | 14 | #include "chrome/browser/profiles/profile.h" |
rdevlin.cronin | f3af70d5 | 2015-03-20 03:55:04 | [diff] [blame] | 15 | #include "chrome/browser/ui/browser_navigator.h" |
thestig | e8082124 | 2015-09-30 23:46:08 | [diff] [blame] | 16 | #include "chrome/browser/ui/browser_navigator_params.h" |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 17 | #include "chrome/browser/ui/native_window_tracker.h" |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 18 | #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
Dominick Ng | 98e8822 | 2019-01-14 00:38:57 | [diff] [blame] | 19 | #include "chrome/grit/chromium_strings.h" |
[email protected] | af39f00 | 2014-08-22 10:18:18 | [diff] [blame] | 20 | #include "chrome/grit/generated_resources.h" |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 21 | #include "components/url_formatter/elide_url.h" |
| 22 | #include "content/public/browser/clear_site_data_utils.h" |
rdevlin.cronin | 6620949 | 2015-06-10 20:44:05 | [diff] [blame] | 23 | #include "extensions/browser/extension_dialog_auto_confirm.h" |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 24 | #include "extensions/browser/extension_system.h" |
[email protected] | 326e6f0 | 2014-06-20 04:53:37 | [diff] [blame] | 25 | #include "extensions/browser/image_loader.h" |
[email protected] | cda103d | 2014-04-04 16:22:39 | [diff] [blame] | 26 | #include "extensions/common/constants.h" |
[email protected] | e4452d3 | 2013-11-15 23:07:41 | [diff] [blame] | 27 | #include "extensions/common/extension.h" |
rdevlin.cronin | f3af70d5 | 2015-03-20 03:55:04 | [diff] [blame] | 28 | #include "extensions/common/extension_urls.h" |
[email protected] | 0db486f | 2014-04-09 19:32:22 | [diff] [blame] | 29 | #include "extensions/common/manifest_handlers/icons_handler.h" |
rdevlin.cronin | dbb8fa5 | 2015-05-06 00:16:56 | [diff] [blame] | 30 | #include "extensions/common/manifest_url_handlers.h" |
[email protected] | 226d79ad | 2014-03-14 21:34:57 | [diff] [blame] | 31 | #include "ui/base/l10n/l10n_util.h" |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 32 | #include "ui/base/layout.h" |
rdevlin.cronin | f3af70d5 | 2015-03-20 03:55:04 | [diff] [blame] | 33 | #include "ui/base/page_transition_types.h" |
| 34 | #include "ui/base/window_open_disposition.h" |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 35 | #include "ui/display/display.h" |
| 36 | #include "ui/display/screen.h" |
[email protected] | bdd6eec | 2012-03-03 19:58:06 | [diff] [blame] | 37 | #include "ui/gfx/image/image.h" |
[email protected] | 50b6626 | 2013-09-24 03:25:48 | [diff] [blame] | 38 | #include "ui/gfx/image/image_skia.h" |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 39 | #include "url/origin.h" |
[email protected] | 502e3961 | 2011-03-26 01:36:28 | [diff] [blame] | 40 | |
[email protected] | d405067 | 2014-06-04 09:18:40 | [diff] [blame] | 41 | namespace extensions { |
| 42 | |
[email protected] | dd46a4ce | 2012-09-15 10:50:50 | [diff] [blame] | 43 | namespace { |
| 44 | |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 45 | constexpr int kIconSize = 64; |
| 46 | |
| 47 | constexpr char kExtensionRemovedError[] = |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 48 | "Extension was removed before dialog closed."; |
| 49 | |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 50 | constexpr char kReferrerId[] = "chrome-remove-extension-dialog"; |
rdevlin.cronin | de23cac | 2015-07-15 23:51:39 | [diff] [blame] | 51 | |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 52 | float GetScaleFactor(gfx::NativeWindow window) { |
| 53 | const display::Screen* screen = display::Screen::GetScreen(); |
| 54 | if (!screen) |
| 55 | return 1.0; // Happens in unit_tests. |
| 56 | if (window) |
| 57 | return screen->GetDisplayNearestWindow(window).device_scale_factor(); |
| 58 | return screen->GetPrimaryDisplay().device_scale_factor(); |
[email protected] | dd46a4ce | 2012-09-15 10:50:50 | [diff] [blame] | 59 | } |
| 60 | |
Bettina Dea | 7264a04b6 | 2018-04-06 04:27:45 | [diff] [blame] | 61 | ExtensionUninstallDialog::OnWillShowCallback* g_on_will_show_callback = nullptr; |
[email protected] | dd46a4ce | 2012-09-15 10:50:50 | [diff] [blame] | 62 | } // namespace |
| 63 | |
Bettina Dea | 7264a04b6 | 2018-04-06 04:27:45 | [diff] [blame] | 64 | void ExtensionUninstallDialog::SetOnShownCallbackForTesting( |
| 65 | ExtensionUninstallDialog::OnWillShowCallback* callback) { |
| 66 | g_on_will_show_callback = callback; |
| 67 | } |
| 68 | |
[email protected] | 6f03db06 | 2011-09-22 20:37:14 | [diff] [blame] | 69 | ExtensionUninstallDialog::ExtensionUninstallDialog( |
[email protected] | 520414b1 | 2013-01-22 19:27:36 | [diff] [blame] | 70 | Profile* profile, |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 71 | gfx::NativeWindow parent, |
[email protected] | 6f03db06 | 2011-09-22 20:37:14 | [diff] [blame] | 72 | ExtensionUninstallDialog::Delegate* delegate) |
Evan Stade | 75872a6 | 2019-09-06 21:17:38 | [diff] [blame] | 73 | : profile_(profile), parent_(parent), delegate_(delegate) { |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 74 | if (parent) |
| 75 | parent_window_tracker_ = NativeWindowTracker::Create(parent); |
[email protected] | 5f1ba41 | 2012-06-25 20:10:52 | [diff] [blame] | 76 | } |
[email protected] | 502e3961 | 2011-03-26 01:36:28 | [diff] [blame] | 77 | |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 78 | ExtensionUninstallDialog::~ExtensionUninstallDialog() = default; |
[email protected] | 502e3961 | 2011-03-26 01:36:28 | [diff] [blame] | 79 | |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 80 | void ExtensionUninstallDialog::ConfirmUninstallByExtension( |
| 81 | const scoped_refptr<const Extension>& extension, |
| 82 | const scoped_refptr<const Extension>& triggering_extension, |
rdevlin.cronin | e18eb8cd | 2015-07-16 16:31:28 | [diff] [blame] | 83 | UninstallReason reason, |
| 84 | UninstallSource source) { |
[email protected] | 226d79ad | 2014-03-14 21:34:57 | [diff] [blame] | 85 | triggering_extension_ = triggering_extension; |
rdevlin.cronin | e18eb8cd | 2015-07-16 16:31:28 | [diff] [blame] | 86 | ConfirmUninstall(extension, reason, source); |
[email protected] | 226d79ad | 2014-03-14 21:34:57 | [diff] [blame] | 87 | } |
| 88 | |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 89 | void ExtensionUninstallDialog::ConfirmUninstall( |
| 90 | const scoped_refptr<const Extension>& extension, |
rdevlin.cronin | e18eb8cd | 2015-07-16 16:31:28 | [diff] [blame] | 91 | UninstallReason reason, |
| 92 | UninstallSource source) { |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 93 | DCHECK(thread_checker_.CalledOnValidThread()); |
rdevlin.cronin | e18eb8cd | 2015-07-16 16:31:28 | [diff] [blame] | 94 | |
| 95 | UMA_HISTOGRAM_ENUMERATION("Extensions.UninstallSource", source, |
| 96 | NUM_UNINSTALL_SOURCES); |
| 97 | |
[email protected] | 502e3961 | 2011-03-26 01:36:28 | [diff] [blame] | 98 | extension_ = extension; |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 99 | uninstall_reason_ = reason; |
[email protected] | eed8549 | 2013-01-14 20:37:46 | [diff] [blame] | 100 | |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 101 | if (parent() && parent_window_tracker_->WasNativeWindowClosed()) { |
| 102 | OnDialogClosed(CLOSE_ACTION_CANCELED); |
[email protected] | e0ebb8d | 2014-05-21 20:26:27 | [diff] [blame] | 103 | return; |
| 104 | } |
| 105 | |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 106 | // Track that extension uninstalled externally. |
| 107 | DCHECK(!observer_.IsObserving(ExtensionRegistry::Get(profile_))); |
| 108 | observer_.Add(ExtensionRegistry::Get(profile_)); |
| 109 | |
| 110 | // Dialog will be shown once icon is loaded. |
| 111 | DCHECK(!dialog_shown_); |
| 112 | icon_ = ChromeAppIconService::Get(profile_)->CreateIcon(this, extension->id(), |
| 113 | kIconSize); |
| 114 | icon_->image_skia().GetRepresentation(GetScaleFactor(parent_)); |
| 115 | } |
| 116 | |
| 117 | void ExtensionUninstallDialog::OnIconUpdated(ChromeAppIcon* icon) { |
| 118 | // Ignore initial update. |
| 119 | if (!icon_ || dialog_shown_) |
| 120 | return; |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 121 | DCHECK_EQ(icon, icon_.get()); |
| 122 | |
| 123 | dialog_shown_ = true; |
| 124 | |
| 125 | if (parent() && parent_window_tracker_->WasNativeWindowClosed()) { |
| 126 | OnDialogClosed(CLOSE_ACTION_CANCELED); |
| 127 | return; |
| 128 | } |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 129 | |
Bettina Dea | 7264a04b6 | 2018-04-06 04:27:45 | [diff] [blame] | 130 | if (g_on_will_show_callback != nullptr) |
| 131 | g_on_will_show_callback->Run(this); |
| 132 | |
rdevlin.cronin | 6620949 | 2015-06-10 20:44:05 | [diff] [blame] | 133 | switch (ScopedTestDialogAutoConfirm::GetAutoConfirmValue()) { |
| 134 | case ScopedTestDialogAutoConfirm::NONE: |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 135 | Show(); |
| 136 | break; |
catmullings | ff559d9 | 2017-05-20 01:43:36 | [diff] [blame] | 137 | case ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION: |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 138 | OnDialogClosed(CLOSE_ACTION_UNINSTALL_AND_CHECKBOX_CHECKED); |
catmullings | ff559d9 | 2017-05-20 01:43:36 | [diff] [blame] | 139 | break; |
rdevlin.cronin | 6620949 | 2015-06-10 20:44:05 | [diff] [blame] | 140 | case ScopedTestDialogAutoConfirm::ACCEPT: |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 141 | OnDialogClosed(CLOSE_ACTION_UNINSTALL); |
| 142 | break; |
rdevlin.cronin | 6620949 | 2015-06-10 20:44:05 | [diff] [blame] | 143 | case ScopedTestDialogAutoConfirm::CANCEL: |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 144 | OnDialogClosed(CLOSE_ACTION_CANCELED); |
| 145 | break; |
| 146 | } |
[email protected] | 5f1ba41 | 2012-06-25 20:10:52 | [diff] [blame] | 147 | } |
[email protected] | 226d79ad | 2014-03-14 21:34:57 | [diff] [blame] | 148 | |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 149 | void ExtensionUninstallDialog::OnExtensionUninstalled( |
| 150 | content::BrowserContext* browser_context, |
| 151 | const Extension* extension, |
| 152 | UninstallReason reason) { |
| 153 | // Handle the case when extension was uninstalled externally and we have to |
| 154 | // close current dialog. |
| 155 | if (extension != extension_) |
| 156 | return; |
| 157 | |
| 158 | delegate_->OnExtensionUninstallDialogClosed( |
| 159 | false, base::ASCIIToUTF16(kExtensionRemovedError)); |
| 160 | } |
| 161 | |
[email protected] | 226d79ad | 2014-03-14 21:34:57 | [diff] [blame] | 162 | std::string ExtensionUninstallDialog::GetHeadingText() { |
| 163 | if (triggering_extension_) { |
| 164 | return l10n_util::GetStringFUTF8( |
| 165 | IDS_EXTENSION_PROGRAMMATIC_UNINSTALL_PROMPT_HEADING, |
| 166 | base::UTF8ToUTF16(triggering_extension_->name()), |
| 167 | base::UTF8ToUTF16(extension_->name())); |
| 168 | } |
| 169 | return l10n_util::GetStringFUTF8(IDS_EXTENSION_UNINSTALL_PROMPT_HEADING, |
| 170 | base::UTF8ToUTF16(extension_->name())); |
| 171 | } |
[email protected] | d405067 | 2014-06-04 09:18:40 | [diff] [blame] | 172 | |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 173 | GURL ExtensionUninstallDialog::GetLaunchURL() const { |
| 174 | return AppLaunchInfo::GetFullLaunchURL(extension_.get()); |
| 175 | } |
| 176 | |
| 177 | bool ExtensionUninstallDialog::ShouldShowCheckbox() const { |
| 178 | return ShouldShowReportAbuseCheckbox() || ShouldShowRemoveDataCheckbox(); |
| 179 | } |
| 180 | |
| 181 | base::string16 ExtensionUninstallDialog::GetCheckboxLabel() const { |
| 182 | DCHECK(ShouldShowCheckbox()); |
| 183 | |
| 184 | if (ShouldShowReportAbuseCheckbox()) { |
| 185 | return triggering_extension_.get() |
| 186 | ? l10n_util::GetStringFUTF16( |
| 187 | IDS_EXTENSION_PROMPT_UNINSTALL_REPORT_ABUSE_FROM_EXTENSION, |
| 188 | base::UTF8ToUTF16(extension_->name())) |
| 189 | : l10n_util::GetStringUTF16( |
| 190 | IDS_EXTENSION_PROMPT_UNINSTALL_REPORT_ABUSE); |
| 191 | } |
| 192 | |
| 193 | DCHECK(ShouldShowRemoveDataCheckbox()); |
| 194 | return l10n_util::GetStringFUTF16( |
| 195 | IDS_EXTENSION_UNINSTALL_PROMPT_REMOVE_DATA_CHECKBOX, |
| 196 | url_formatter::FormatUrlForSecurityDisplay( |
| 197 | GetLaunchURL(), url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC)); |
rdevlin.cronin | f3af70d5 | 2015-03-20 03:55:04 | [diff] [blame] | 198 | } |
| 199 | |
rdevlin.cronin | 4f01c5f1 | 2015-05-07 17:52:00 | [diff] [blame] | 200 | void ExtensionUninstallDialog::OnDialogClosed(CloseAction action) { |
| 201 | // We don't want to artificially weight any of the options, so only record if |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 202 | // a checkbox was shown. |
rdevlin.cronin | 4f01c5f1 | 2015-05-07 17:52:00 | [diff] [blame] | 203 | if (ShouldShowReportAbuseCheckbox()) { |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 204 | UMA_HISTOGRAM_ENUMERATION("Extensions.UninstallDialogAction", action, |
| 205 | CLOSE_ACTION_LAST); |
| 206 | } else if (ShouldShowRemoveDataCheckbox()) { |
| 207 | UMA_HISTOGRAM_ENUMERATION("Webapp.UninstallDialogAction", action, |
rdevlin.cronin | 4f01c5f1 | 2015-05-07 17:52:00 | [diff] [blame] | 208 | CLOSE_ACTION_LAST); |
| 209 | } |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 210 | |
| 211 | bool success = false; |
| 212 | base::string16 error; |
| 213 | switch (action) { |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 214 | case CLOSE_ACTION_UNINSTALL_AND_CHECKBOX_CHECKED: |
catmullings | ff559d9 | 2017-05-20 01:43:36 | [diff] [blame] | 215 | success = Uninstall(&error); |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 216 | if (ShouldShowRemoveDataCheckbox()) { |
| 217 | content::ClearSiteData( |
| 218 | base::BindRepeating( |
| 219 | [](content::BrowserContext* browser_context) { |
| 220 | return browser_context; |
| 221 | }, |
| 222 | base::Unretained(profile_)), |
| 223 | url::Origin::Create(GetLaunchURL()), true /*clear_cookies*/, |
| 224 | true /*clear_storage*/, true /*clear_cache*/, |
| 225 | false /*avoid_closing_connections*/, base::DoNothing()); |
| 226 | } else { |
| 227 | // If the extension specifies a custom uninstall page via |
| 228 | // chrome.runtime.setUninstallURL, then at uninstallation its uninstall |
| 229 | // page opens. To ensure that the CWS Report Abuse page is the active |
| 230 | // tab at uninstallation, HandleReportAbuse() is called after |
| 231 | // Uninstall(). |
| 232 | HandleReportAbuse(); |
| 233 | } |
catmullings | ff559d9 | 2017-05-20 01:43:36 | [diff] [blame] | 234 | break; |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 235 | case CLOSE_ACTION_UNINSTALL: |
catmullings | ff559d9 | 2017-05-20 01:43:36 | [diff] [blame] | 236 | success = Uninstall(&error); |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 237 | break; |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 238 | case CLOSE_ACTION_CANCELED: |
| 239 | error = base::ASCIIToUTF16("User canceled uninstall dialog"); |
| 240 | break; |
| 241 | case CLOSE_ACTION_LAST: |
| 242 | NOTREACHED(); |
| 243 | } |
rdevlin.cronin | ac8ce8c | 2015-05-27 23:00:02 | [diff] [blame] | 244 | delegate_->OnExtensionUninstallDialogClosed(success, error); |
rdevlin.cronin | 4f01c5f1 | 2015-05-07 17:52:00 | [diff] [blame] | 245 | } |
| 246 | |
catmullings | ff559d9 | 2017-05-20 01:43:36 | [diff] [blame] | 247 | bool ExtensionUninstallDialog::Uninstall(base::string16* error) { |
| 248 | const Extension* current_extension = |
| 249 | ExtensionRegistry::Get(profile_)->GetExtensionById( |
| 250 | extension_->id(), ExtensionRegistry::EVERYTHING); |
| 251 | if (current_extension) { |
khmel | 0df82202 | 2017-06-23 02:02:56 | [diff] [blame] | 252 | // Prevent notifications triggered by our request. |
| 253 | observer_.RemoveAll(); |
catmullings | ff559d9 | 2017-05-20 01:43:36 | [diff] [blame] | 254 | return ExtensionSystem::Get(profile_) |
| 255 | ->extension_service() |
Devlin Cronin | 218df7f | 2017-11-21 21:41:31 | [diff] [blame] | 256 | ->UninstallExtension(extension_->id(), uninstall_reason_, error); |
catmullings | ff559d9 | 2017-05-20 01:43:36 | [diff] [blame] | 257 | } |
| 258 | *error = base::ASCIIToUTF16(kExtensionRemovedError); |
| 259 | return false; |
| 260 | } |
| 261 | |
rdevlin.cronin | f3af70d5 | 2015-03-20 03:55:04 | [diff] [blame] | 262 | void ExtensionUninstallDialog::HandleReportAbuse() { |
cm.sanchi | 2522bc9 | 2017-12-04 08:04:13 | [diff] [blame] | 263 | NavigateParams params( |
rdevlin.cronin | f3af70d5 | 2015-03-20 03:55:04 | [diff] [blame] | 264 | profile_, |
rdevlin.cronin | de23cac | 2015-07-15 23:51:39 | [diff] [blame] | 265 | extension_urls::GetWebstoreReportAbuseUrl(extension_->id(), kReferrerId), |
rdevlin.cronin | f3af70d5 | 2015-03-20 03:55:04 | [diff] [blame] | 266 | ui::PAGE_TRANSITION_LINK); |
nick | 3b04f32 | 2016-08-31 19:29:19 | [diff] [blame] | 267 | params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
cm.sanchi | 2522bc9 | 2017-12-04 08:04:13 | [diff] [blame] | 268 | Navigate(¶ms); |
rdevlin.cronin | f3af70d5 | 2015-03-20 03:55:04 | [diff] [blame] | 269 | } |
| 270 | |
Dominick Ng | 2a47d2f | 2019-01-08 09:05:01 | [diff] [blame] | 271 | bool ExtensionUninstallDialog::ShouldShowReportAbuseCheckbox() const { |
| 272 | return ManifestURL::UpdatesFromGallery(extension_.get()); |
| 273 | } |
| 274 | |
| 275 | bool ExtensionUninstallDialog::ShouldShowRemoveDataCheckbox() const { |
| 276 | return extension_->from_bookmark(); |
| 277 | } |
| 278 | |
[email protected] | d405067 | 2014-06-04 09:18:40 | [diff] [blame] | 279 | } // namespace extensions |