| Index: chrome/common/extensions/extension.h
|
| diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
|
| index b96eaecb099271ea52d394965d9fbda4f9abd636..ffc110347c9cf6740b71aa112191afc56442acc8 100644
|
| --- a/chrome/common/extensions/extension.h
|
| +++ b/chrome/common/extensions/extension.h
|
| @@ -100,28 +100,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
|
| bool is_public; // False if only this extension can load this plugin.
|
| };
|
|
|
| - // Contains the subset of the extension's (private) data that can be modified
|
| - // after initialization. This class should only be accessed on the UI thread.
|
| - struct RuntimeData {
|
| - // We keep a cache of images loaded from extension resources based on their
|
| - // path and a string representation of a size that may have been used to
|
| - // scale it (or the empty string if the image is at its original size).
|
| - typedef std::pair<FilePath, std::string> ImageCacheKey;
|
| - typedef std::map<ImageCacheKey, SkBitmap> ImageCache;
|
| -
|
| - RuntimeData();
|
| - ~RuntimeData();
|
| -
|
| - // True if the background page is ready.
|
| - bool background_page_ready;
|
| -
|
| - // True while the extension is being upgraded.
|
| - bool being_upgraded;
|
| -
|
| - // Cached images for this extension.
|
| - ImageCache image_cache_;
|
| - };
|
| -
|
| // A permission is defined by its |name| (what is used in the manifest),
|
| // and the |message_id| that's used by install/update UI.
|
| struct Permission {
|
| @@ -440,22 +418,15 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
|
| return theme_display_properties_.get();
|
| }
|
|
|
| - // Whether the background page, if any, is ready. We don't load other
|
| - // components until then. If there is no background page, we consider it to
|
| - // be ready.
|
| - bool GetBackgroundPageReady() const;
|
| - void SetBackgroundPageReady() const;
|
| -
|
| - // Getter and setter for the flag that specifies whether the extension is
|
| - // being upgraded.
|
| - bool being_upgraded() const { return GetRuntimeData()->being_upgraded; }
|
| - void set_being_upgraded(bool value) const {
|
| - GetRuntimeData()->being_upgraded = value;
|
| - }
|
| -
|
| private:
|
| friend class base::RefCountedThreadSafe<Extension>;
|
|
|
| + // We keep a cache of images loaded from extension resources based on their
|
| + // path and a string representation of a size that may have been used to
|
| + // scale it (or the empty string if the image is at its original size).
|
| + typedef std::pair<FilePath, std::string> ImageCacheKey;
|
| + typedef std::map<ImageCacheKey, SkBitmap> ImageCache;
|
| +
|
| // Normalize the path for use by the extension. On Windows, this will make
|
| // sure the drive letter is uppercase.
|
| static FilePath MaybeNormalizePath(const FilePath& path);
|
| @@ -532,12 +503,9 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
|
| // this extension.
|
| string16 GetHostPermissionMessage() const;
|
|
|
| - // Returns a mutable pointer to our runtime data. Can only be called on
|
| - // the UI thread.
|
| - RuntimeData* GetRuntimeData() const;
|
| -
|
| - // Runtime data.
|
| - const RuntimeData runtime_data_;
|
| + // Cached images for this extension. This should only be touched on the UI
|
| + // thread.
|
| + mutable ImageCache image_cache_;
|
|
|
| // A persistent, globally unique ID. An extension's ID is used in things
|
| // like directory structures and URLs, and is expected to not change across
|
|
|