summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-14 02:52:41 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-14 02:52:41 +0000
commit334a09b8daa1069691c9b7f1bc063e0790eccc88 (patch)
treebad62bcfa5f8129273f7e2fde509b2e193abeab3 /chrome
parent2cceb4914d3e00f52a06979be021ee2df19220ac (diff)
downloadchromium_src-334a09b8daa1069691c9b7f1bc063e0790eccc88.zip
chromium_src-334a09b8daa1069691c9b7f1bc063e0790eccc88.tar.gz
chromium_src-334a09b8daa1069691c9b7f1bc063e0790eccc88.tar.bz2
Fix for memory leak bug 89144.
BUG=89144 TEST=Valgrind bots Review URL: http://codereview.chromium.org/7354023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/webui/ntp/app_launcher_handler.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 1aacaa0..616ccea 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -290,7 +290,7 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
// The Cloud Print app should never be displayed in the NTP.
const Extension* extension = *it;
DictionaryValue* app_info = GetAppInfo(extension);
- if (app_info && ((*it)->id() != extension_misc::kCloudPrintAppId))
+ if (app_info)
list->Append(app_info);
}
@@ -345,7 +345,8 @@ DictionaryValue* AppLauncherHandler::GetAppInfo(const Extension* extension) {
bool ntp3 =
!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage4);
if (!extension->is_app() ||
- (ntp3 && extension->id() == extension_misc::kWebStoreAppId)) {
+ (ntp3 && extension->id() == extension_misc::kWebStoreAppId) ||
+ (extension->id() == extension_misc::kCloudPrintAppId)) {
return NULL;
}