diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 18:03:41 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 18:03:41 +0000 |
commit | bbbc1ef9d160f602aed88ed2eecd6063e5952ca7 (patch) | |
tree | 256e507e11d22bc154edcef45746ee38b8d1a64e /chrome/browser/cocoa | |
parent | a1ff529fcffcded364926b58c1f2c8afc839adeb (diff) | |
download | chromium_src-bbbc1ef9d160f602aed88ed2eecd6063e5952ca7.zip chromium_src-bbbc1ef9d160f602aed88ed2eecd6063e5952ca7.tar.gz chromium_src-bbbc1ef9d160f602aed88ed2eecd6063e5952ca7.tar.bz2 |
Use TabContents::GetDefaultTitle() everywhere we need a title for an untitled tab/page. This will let us remove a couple of duplicate strings.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/604021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/hung_renderer_controller.mm | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/chrome/browser/cocoa/hung_renderer_controller.mm b/chrome/browser/cocoa/hung_renderer_controller.mm index 36c9441..74ddff5 100644 --- a/chrome/browser/cocoa/hung_renderer_controller.mm +++ b/chrome/browser/cocoa/hung_renderer_controller.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -137,13 +137,10 @@ HungRendererController* g_instance = NULL; scoped_nsobject<NSMutableArray> favicons([[NSMutableArray alloc] init]); for (TabContentsIterator it; !it.done(); ++it) { if (it->GetRenderProcessHost() == hungContents_->GetRenderProcessHost()) { - const string16 title = (*it)->GetTitle(); - if (title.empty()) { - [titles addObject: - l10n_util::GetNSStringWithFixup(IDS_TAB_UNTITLED_TITLE)]; - } else { - [titles addObject:base::SysUTF16ToNSString(title)]; - } + string16 title = (*it)->GetTitle(); + if (title.empty()) + title = TabContents::GetDefaultTitle(); + [titles addObject:base::SysUTF16ToNSString(title)]; // TabContents can return a null SkBitmap if it has no favicon. If this // happens, use the default favicon. |