| OLD | NEW |
| 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/external_install_ui.h" | 5 #include "chrome/browser/extensions/external_install_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 extension_misc::EXTENSION_ICON_SMALL))); | 370 extension_misc::EXTENSION_ICON_SMALL))); |
| 371 } | 371 } |
| 372 | 372 |
| 373 string16 ExternalInstallGlobalError::GetBubbleViewTitle() { | 373 string16 ExternalInstallGlobalError::GetBubbleViewTitle() { |
| 374 return prompt_->GetDialogTitle(); | 374 return prompt_->GetDialogTitle(); |
| 375 } | 375 } |
| 376 | 376 |
| 377 std::vector<string16> ExternalInstallGlobalError::GetBubbleViewMessages() { | 377 std::vector<string16> ExternalInstallGlobalError::GetBubbleViewMessages() { |
| 378 std::vector<string16> messages; | 378 std::vector<string16> messages; |
| 379 messages.push_back(prompt_->GetHeading()); | 379 messages.push_back(prompt_->GetHeading()); |
| 380 if (prompt_->GetPermissionCount()) { | 380 if (prompt_->GetPermissionCount(false)) { |
| 381 messages.push_back(prompt_->GetPermissionsHeading()); | 381 messages.push_back(prompt_->GetPermissionsHeading()); |
| 382 for (size_t i = 0; i < prompt_->GetPermissionCount(); ++i) { | 382 for (size_t i = 0; i < prompt_->GetPermissionCount(false); ++i) { |
| 383 messages.push_back(l10n_util::GetStringFUTF16( | 383 messages.push_back(l10n_util::GetStringFUTF16( |
| 384 IDS_EXTENSION_PERMISSION_LINE, | 384 IDS_EXTENSION_PERMISSION_LINE, |
| 385 prompt_->GetPermission(i))); | 385 prompt_->GetPermission(i, false))); |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 // TODO(yoz): OAuth issue advice? | 388 // TODO(yoz): OAuth issue advice? |
| 389 return messages; | 389 return messages; |
| 390 } | 390 } |
| 391 | 391 |
| 392 string16 ExternalInstallGlobalError::GetBubbleViewAcceptButtonLabel() { | 392 string16 ExternalInstallGlobalError::GetBubbleViewAcceptButtonLabel() { |
| 393 return prompt_->GetAcceptButtonLabel(); | 393 return prompt_->GetAcceptButtonLabel(); |
| 394 } | 394 } |
| 395 | 395 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 459 |
| 460 bool HasExternalInstallBubble(ExtensionService* service) { | 460 bool HasExternalInstallBubble(ExtensionService* service) { |
| 461 GlobalErrorService* error_service = | 461 GlobalErrorService* error_service = |
| 462 GlobalErrorServiceFactory::GetForProfile(service->profile()); | 462 GlobalErrorServiceFactory::GetForProfile(service->profile()); |
| 463 GlobalError* error = error_service->GetGlobalErrorByMenuItemCommandID( | 463 GlobalError* error = error_service->GetGlobalErrorByMenuItemCommandID( |
| 464 kMenuCommandId); | 464 kMenuCommandId); |
| 465 return error && error->HasBubbleView(); | 465 return error && error->HasBubbleView(); |
| 466 } | 466 } |
| 467 | 467 |
| 468 } // namespace extensions | 468 } // namespace extensions |
| OLD | NEW |