Index: chrome/common/extensions/extension.cc |
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc |
index 6faa1d0c0296293084b4413660ddd9dc15497c66..5fbd03b7ad2c59879b3f683f51d26a95dde4a6ff 100644 |
--- a/chrome/common/extensions/extension.cc |
+++ b/chrome/common/extensions/extension.cc |
@@ -249,15 +249,10 @@ const size_t Extension::kNumHostedAppPermissions = |
const char Extension::kOldUnlimitedStoragePermission[] = "unlimited_storage"; |
// |
-// Extension::RuntimeData |
+// Extension |
// |
-Extension::RuntimeData::RuntimeData() |
- : background_page_ready(false), |
- being_upgraded(false) { |
-} |
- |
-Extension::RuntimeData::~RuntimeData() { |
+// static |
} |
// |
@@ -1929,20 +1924,6 @@ GURL Extension::GetFullLaunchURL() const { |
return GURL(launch_web_url()); |
} |
-bool Extension::GetBackgroundPageReady() const { |
- return (GetRuntimeData()->background_page_ready || |
- background_url().is_empty()); |
-} |
- |
-void Extension::SetBackgroundPageReady() const { |
- DCHECK(!background_url().is_empty()); |
- GetRuntimeData()->background_page_ready = true; |
- NotificationService::current()->Notify( |
- NotificationType::EXTENSION_BACKGROUND_PAGE_READY, |
- Source<Extension>(this), |
- NotificationService::NoDetails()); |
-} |
- |
static std::string SizeToString(const gfx::Size& max_size) { |
return base::IntToString(max_size.width()) + "x" + |
base::IntToString(max_size.height()); |
@@ -1968,11 +1949,9 @@ void Extension::SetCachedImage(const ExtensionResource& source, |
const FilePath& path = source.relative_path(); |
gfx::Size actual_size(image.width(), image.height()); |
if (actual_size == original_size) { |
- GetRuntimeData()->image_cache_[ |
- RuntimeData::ImageCacheKey(path, std::string())] = image; |
+ image_cache_[ImageCacheKey(path, std::string())] = image; |
} else { |
- GetRuntimeData()->image_cache_[ |
- RuntimeData::ImageCacheKey(path, SizeToString(actual_size))] = image; |
+ image_cache_[ImageCacheKey(path, SizeToString(actual_size))] = image; |
} |
} |
@@ -1996,16 +1975,15 @@ SkBitmap* Extension::GetCachedImageImpl(const ExtensionResource& source, |
const FilePath& path = source.relative_path(); |
// Look for exact size match. |
- RuntimeData::ImageCache::iterator i = GetRuntimeData()->image_cache_.find( |
- RuntimeData::ImageCacheKey(path, SizeToString(max_size))); |
- if (i != GetRuntimeData()->image_cache_.end()) |
+ ImageCache::iterator i = image_cache_.find( |
+ ImageCacheKey(path, SizeToString(max_size))); |
+ if (i != image_cache_.end()) |
return &(i->second); |
// If we have the original size version cached, return that if it's small |
// enough. |
- i = GetRuntimeData()->image_cache_.find( |
- RuntimeData::ImageCacheKey(path, std::string())); |
- if (i != GetRuntimeData()->image_cache_.end()) { |
+ i = image_cache_.find(ImageCacheKey(path, std::string())); |
+ if (i != image_cache_.end()) { |
SkBitmap& image = i->second; |
if (image.width() <= max_size.width() && |
image.height() <= max_size.height()) |
@@ -2224,12 +2202,6 @@ bool Extension::CanExecuteScriptEverywhere() const { |
return false; |
} |
-Extension::RuntimeData* Extension::GetRuntimeData() const { |
- // TODO(mpcomplete): it would be nice if I could verify we were on the UI |
- // thread, but we're in common and don't have access to BrowserThread. |
- return const_cast<Extension::RuntimeData*>(&runtime_data_); |
-} |
- |
ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest, |
const std::string& id, |
const FilePath& path, |