Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2559)

Unified Diff: chrome/browser/notifications/sync_notifier/synced_notification.cc

Issue 23981004: Synced Notifications Layout Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/sync_notifier/synced_notification.cc
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification.cc b/chrome/browser/notifications/sync_notifier/synced_notification.cc
index 00e8df229764056544c4ec5adfeca11be0406e1c..c850cac8556b44a48ea27ed39162ed6952d2ffb7 100644
--- a/chrome/browser/notifications/sync_notifier/synced_notification.cc
+++ b/chrome/browser/notifications/sync_notifier/synced_notification.cc
@@ -114,7 +114,6 @@ void SyncedNotification::OnFetchComplete(const GURL url,
// Count off the bitmaps as they arrive.
--active_fetcher_count_;
- DCHECK_GE(active_fetcher_count_, 0);
// See if all bitmaps are accounted for, if so call Show.
if (active_fetcher_count_ == 0) {
Show(notification_manager_, notifier_service_, profile_);
@@ -219,7 +218,6 @@ void SyncedNotification::Show(NotificationUIManager* notification_manager,
base::Time creation_time =
base::Time::FromDoubleT(static_cast<double>(GetCreationTime()));
int priority = GetPriority();
- int notification_count = GetNotificationCount();
dewittj 2013/09/05 23:39:43 If we're not showing this anymore, would it make m
Pete Williamson 2013/09/06 21:01:42 I'd prefer to leave it as is. I want to detect an
unsigned int button_count = GetButtonCount();
// Deduce which notification template to use from the data.
@@ -227,8 +225,6 @@ void SyncedNotification::Show(NotificationUIManager* notification_manager,
message_center::NOTIFICATION_TYPE_BASE_FORMAT;
if (!image_url.is_empty()) {
notification_type = message_center::NOTIFICATION_TYPE_IMAGE;
- } else if (notification_count > 1) {
- notification_type = message_center::NOTIFICATION_TYPE_MULTIPLE;
} else if (button_count > 0) {
notification_type = message_center::NOTIFICATION_TYPE_BASE_FORMAT;
}
@@ -263,26 +259,14 @@ void SyncedNotification::Show(NotificationUIManager* notification_manager,
if (!image_bitmap_.IsEmpty())
rich_notification_data.image = image_bitmap_;
- // Fill the individual notification fields for a multiple notification.
- if (notification_count > 1) {
- for (int ii = 0; ii < notification_count; ++ii) {
- message_center::NotificationItem item(
- UTF8ToUTF16(GetContainedNotificationTitle(ii)),
- UTF8ToUTF16(GetContainedNotificationMessage(ii)));
- rich_notification_data.items.push_back(item);
- }
- }
-
- // The text encompasses both the description and the annotation.
- if (!notification_text.empty())
- notification_text = notification_text + newline;
- notification_text = notification_text + annotation;
+ // Set the ContextMessage inside the rich notification data for the
+ // annotation.
+ rich_notification_data.context_message = annotation;
- // If there is a single person sending, use their picture instead of the app
- // icon.
+ // If there is at least one person sending, use the first picture.
// TODO(petewil): Someday combine multiple profile photos here.
gfx::Image icon_bitmap = app_icon_bitmap_;
- if (GetProfilePictureCount() == 1) {
+ if (GetProfilePictureCount() >= 1) {
icon_bitmap = sender_bitmap_;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698