diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-17 00:35:02 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-17 00:35:02 +0000 |
commit | 58dca55cff5214cc413bd9acc0a78bdd3c14e0a7 (patch) | |
tree | d59b91ed98a1d19cda81480b97090070c505821a /chrome/browser/browser_process_impl.h | |
parent | a7c9a1aa1e81d8fb3634ca9f88d25e142b1d1d43 (diff) | |
download | chromium_src-58dca55cff5214cc413bd9acc0a78bdd3c14e0a7.zip chromium_src-58dca55cff5214cc413bd9acc0a78bdd3c14e0a7.tar.gz chromium_src-58dca55cff5214cc413bd9acc0a78bdd3c14e0a7.tar.bz2 |
Fix a crash when the ThumbnailGenerator.
This happens when the ThumbnailGenerator is initialized because the
NotificationService doesn't exist yet. This patch adds a function that
TabContentscalls to make sure it is registered to avoid this problem.
Review URL: http://codereview.chromium.org/126239
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.h')
-rw-r--r-- | chrome/browser/browser_process_impl.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index 27ce62acd..671f6b7 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -7,8 +7,8 @@ // if we tried to create a service, and not try creating it over and over if // the creation failed. -#ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H__ -#define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H__ +#ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ +#define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ #include <string> @@ -130,6 +130,10 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { return icon_manager_.get(); } + virtual ThumbnailGenerator* GetThumbnailGenerator() { + return &thumbnail_generator_; + } + virtual AutomationProviderList* InitAutomationProviderList() { DCHECK(CalledOnValidThread()); if (automation_provider_list_.get() == NULL) { @@ -271,20 +275,14 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { bool checked_for_new_frames_; bool using_new_frames_; -#if defined(LINUX2) - // TODO(brettw) enable this for all builds when we have a need for it. This - // component has some overhead, so we don't want to have it running without - // any consumers. Since it integrates by listening to notifications, it's - // sufficient to just not instatiate it to make it disabled. - - // This service just sits around and makes thumanails for tabs. + // This service just sits around and makes thumanails for tabs. It does + // nothing in the cosntructor so we don't have to worry about lazy init. ThumbnailGenerator thumbnail_generator_; -#endif // An event that notifies when we are shutting-down. scoped_ptr<base::WaitableEvent> shutdown_event_; - DISALLOW_EVIL_CONSTRUCTORS(BrowserProcessImpl); + DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); }; -#endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H__ +#endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |