summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-18 19:50:55 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-18 19:50:55 +0000
commit3ecda25370679e59f6bc5a05181d9698b3d10182 (patch)
treed800a6b24395baedbd63a2869cd124910e83ac9b /chrome/browser/tab_contents
parent1e61db506aa4c0014d384c2d990525be38cdbc60 (diff)
downloadchromium_src-3ecda25370679e59f6bc5a05181d9698b3d10182.zip
chromium_src-3ecda25370679e59f6bc5a05181d9698b3d10182.tar.gz
chromium_src-3ecda25370679e59f6bc5a05181d9698b3d10182.tar.bz2
Revert 66646 - Add "open as window" menu item to NTP app menu.
BUG=59697 TEST=BrowserTest.OpenAppWindowLikeNtp,SessionRestoreUITest.RestoreAfterClosing* Review URL: http://codereview.chromium.org/5019005 TBR=skerner@chromium.org Review URL: http://codereview.chromium.org/5168004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66665 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc5
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc10
2 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 75b6ddc..8c8754d 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -39,7 +39,10 @@ RenderViewHostDelegateViewHelper::MaybeCreateBackgroundContents(
const string16& frame_name) {
ExtensionsService* extensions_service = profile->GetExtensionsService();
- if (!opener_url.is_valid() || frame_name.empty())
+ if (!opener_url.is_valid() ||
+ frame_name.empty() ||
+ !extensions_service ||
+ !extensions_service->is_ready())
return NULL;
const Extension* extension =
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 979b40b..5f091ee 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -598,10 +598,12 @@ void TabContents::SetExtensionAppById(const std::string& extension_app_id) {
return;
ExtensionsService* extension_service = profile()->GetExtensionsService();
- const Extension* extension =
- extension_service->GetExtensionById(extension_app_id, false);
- if (extension)
- SetExtensionApp(extension);
+ if (extension_service && extension_service->is_ready()) {
+ const Extension* extension =
+ extension_service->GetExtensionById(extension_app_id, false);
+ if (extension)
+ SetExtensionApp(extension);
+ }
}
SkBitmap* TabContents::GetExtensionAppIcon() {