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

Side by Side Diff: chrome/browser/extensions/extension_disabled_ui.cc

Issue 1006453002: Extensions: Prepare switch to new permission message system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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 #include "chrome/browser/extensions/extension_disabled_ui.h" 5 #include "chrome/browser/extensions/extension_disabled_ui.h"
6 6
7 #include <bitset> 7 #include <bitset>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } else { 286 } else {
287 return l10n_util::GetStringFUTF16(IDS_EXTENSION_DISABLED_ERROR_TITLE, 287 return l10n_util::GetStringFUTF16(IDS_EXTENSION_DISABLED_ERROR_TITLE,
288 base::UTF8ToUTF16(extension_->name())); 288 base::UTF8ToUTF16(extension_->name()));
289 } 289 }
290 } 290 }
291 291
292 std::vector<base::string16> 292 std::vector<base::string16>
293 ExtensionDisabledGlobalError::GetBubbleViewMessages() { 293 ExtensionDisabledGlobalError::GetBubbleViewMessages() {
294 std::vector<base::string16> messages; 294 std::vector<base::string16> messages;
295 std::vector<base::string16> permission_warnings = 295 std::vector<base::string16> permission_warnings =
296 extensions::PermissionMessageProvider::Get()->GetWarningMessages( 296 extensions::PermissionMessageProvider::Get()->GetLegacyWarningMessages(
297 extension_->permissions_data()->active_permissions().get(), 297 extension_->permissions_data()->active_permissions().get(),
298 extension_->GetType()); 298 extension_->GetType());
299 if (is_remote_install_) { 299 if (is_remote_install_) {
300 messages.push_back(l10n_util::GetStringFUTF16( 300 messages.push_back(l10n_util::GetStringFUTF16(
301 extension_->is_app() 301 extension_->is_app()
302 ? IDS_APP_DISABLED_REMOTE_INSTALL_ERROR_LABEL 302 ? IDS_APP_DISABLED_REMOTE_INSTALL_ERROR_LABEL
303 : IDS_EXTENSION_DISABLED_REMOTE_INSTALL_ERROR_LABEL, 303 : IDS_EXTENSION_DISABLED_REMOTE_INSTALL_ERROR_LABEL,
304 base::UTF8ToUTF16(extension_->name()))); 304 base::UTF8ToUTF16(extension_->name())));
305 if (!permission_warnings.empty()) 305 if (!permission_warnings.empty())
306 messages.push_back( 306 messages.push_back(
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 void ShowExtensionDisabledDialog(ExtensionService* service, 456 void ShowExtensionDisabledDialog(ExtensionService* service,
457 content::WebContents* web_contents, 457 content::WebContents* web_contents,
458 const Extension* extension) { 458 const Extension* extension) {
459 scoped_ptr<ExtensionInstallPrompt> install_ui( 459 scoped_ptr<ExtensionInstallPrompt> install_ui(
460 new ExtensionInstallPrompt(web_contents)); 460 new ExtensionInstallPrompt(web_contents));
461 // This object manages its own lifetime. 461 // This object manages its own lifetime.
462 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension); 462 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension);
463 } 463 }
464 464
465 } // namespace extensions 465 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/permissions/permissions_api.cc ('k') | chrome/browser/extensions/extension_install_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698