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

Unified Diff: chrome/browser/extensions/extension_uninstall_dialog.cc

Issue 307413002: Move ExtensionUninstallDialog into extensions namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_uninstall_dialog.cc
diff --git a/chrome/browser/extensions/extension_uninstall_dialog.cc b/chrome/browser/extensions/extension_uninstall_dialog.cc
index ede28c9ebf63695b2e791bfe05a279a39c97fc85..82c44a709531d97d59967b7e3d186f91e97573bc 100644
--- a/chrome/browser/extensions/extension_uninstall_dialog.cc
+++ b/chrome/browser/extensions/extension_uninstall_dialog.cc
@@ -28,14 +28,15 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
+namespace extensions {
+
namespace {
// Returns bitmap for the default icon with size equal to the default icon's
// pixel size under maximal supported scale factor.
SkBitmap GetDefaultIconBitmapForMaxScaleFactor(bool is_app) {
- const gfx::ImageSkia& image = is_app ?
- extensions::util::GetDefaultAppIcon() :
- extensions::util::GetDefaultExtensionIcon();
+ const gfx::ImageSkia& image =
+ is_app ? util::GetDefaultAppIcon() : util::GetDefaultExtensionIcon();
return image.GetRepresentation(
gfx::ImageSkia::GetMaxSupportedScale()).sk_bitmap();
}
@@ -64,34 +65,30 @@ ExtensionUninstallDialog::~ExtensionUninstallDialog() {
}
void ExtensionUninstallDialog::ConfirmProgrammaticUninstall(
- const extensions::Extension* extension,
- const extensions::Extension* triggering_extension) {
+ const Extension* extension,
+ const Extension* triggering_extension) {
triggering_extension_ = triggering_extension;
ConfirmUninstall(extension);
}
-void ExtensionUninstallDialog::ConfirmUninstall(
- const extensions::Extension* extension) {
+void ExtensionUninstallDialog::ConfirmUninstall(const Extension* extension) {
DCHECK(ui_loop_ == base::MessageLoop::current());
extension_ = extension;
// Bookmark apps may not have 128x128 icons so accept 64x64 icons.
const int icon_size = extension_->from_bookmark()
? extension_misc::EXTENSION_ICON_SMALL * 2
: extension_misc::EXTENSION_ICON_LARGE;
- extensions::ExtensionResource image = extensions::IconsInfo::GetIconResource(
- extension_,
- icon_size,
- ExtensionIconSet::MATCH_BIGGER);
+ ExtensionResource image = IconsInfo::GetIconResource(
+ extension_, icon_size, ExtensionIconSet::MATCH_BIGGER);
// Load the image asynchronously. The response will be sent to OnImageLoaded.
state_ = kImageIsLoading;
- extensions::ImageLoader* loader =
- extensions::ImageLoader::Get(profile_);
+ ImageLoader* loader = ImageLoader::Get(profile_);
- std::vector<extensions::ImageLoader::ImageRepresentation> images_list;
- images_list.push_back(extensions::ImageLoader::ImageRepresentation(
+ std::vector<ImageLoader::ImageRepresentation> images_list;
+ images_list.push_back(ImageLoader::ImageRepresentation(
image,
- extensions::ImageLoader::ImageRepresentation::NEVER_RESIZE,
+ ImageLoader::ImageRepresentation::NEVER_RESIZE,
gfx::Size(),
ui::SCALE_FACTOR_100P));
loader->LoadImagesAsync(extension_,
@@ -117,9 +114,9 @@ void ExtensionUninstallDialog::SetIcon(const gfx::Image& image) {
void ExtensionUninstallDialog::OnImageLoaded(const std::string& extension_id,
const gfx::Image& image) {
- const extensions::Extension* target_extension =
- extensions::ExtensionRegistry::Get(profile_)->GetExtensionById(
- extension_id, extensions::ExtensionRegistry::EVERYTHING);
+ const Extension* target_extension =
+ ExtensionRegistry::Get(profile_)
+ ->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING);
if (!target_extension) {
delegate_->ExtensionUninstallCanceled();
return;
@@ -162,3 +159,5 @@ std::string ExtensionUninstallDialog::GetHeadingText() {
return l10n_util::GetStringFUTF8(IDS_EXTENSION_UNINSTALL_PROMPT_HEADING,
base::UTF8ToUTF16(extension_->name()));
}
+
+} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/extension_uninstall_dialog.h ('k') | chrome/browser/ui/app_list/extension_uninstaller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698