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

Side by Side Diff: chrome/browser/notifications/sync_notifier/synced_notification.cc

Issue 16159002: Remove reference to deprecated notification type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/api/push_messaging/push_messaging_api.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/notifications/sync_notifier/synced_notification.h" 5 #include "chrome/browser/notifications/sync_notifier/synced_notification.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 int notification_count = GetNotificationCount(); 89 int notification_count = GetNotificationCount();
90 int button_count = GetButtonCount(); 90 int button_count = GetButtonCount();
91 // TODO(petewil): Refactor this for an arbitrary number of buttons. 91 // TODO(petewil): Refactor this for an arbitrary number of buttons.
92 std::string button_one_title = GetButtonOneTitle(); 92 std::string button_one_title = GetButtonOneTitle();
93 std::string button_one_icon_url = GetButtonOneIconUrl(); 93 std::string button_one_icon_url = GetButtonOneIconUrl();
94 std::string button_two_title = GetButtonTwoTitle(); 94 std::string button_two_title = GetButtonTwoTitle();
95 std::string button_two_icon_url = GetButtonTwoIconUrl(); 95 std::string button_two_icon_url = GetButtonTwoIconUrl();
96 96
97 // Deduce which notification template to use from the data. 97 // Deduce which notification template to use from the data.
98 message_center::NotificationType notification_type = 98 message_center::NotificationType notification_type =
99 message_center::NOTIFICATION_TYPE_SIMPLE; 99 message_center::NOTIFICATION_TYPE_BASE_FORMAT;
100 if (!image_url.is_empty()) { 100 if (!image_url.is_empty()) {
101 notification_type = message_center::NOTIFICATION_TYPE_IMAGE; 101 notification_type = message_center::NOTIFICATION_TYPE_IMAGE;
102 } else if (notification_count > 1) { 102 } else if (notification_count > 1) {
103 notification_type = message_center::NOTIFICATION_TYPE_MULTIPLE; 103 notification_type = message_center::NOTIFICATION_TYPE_MULTIPLE;
104 } else if (button_count > 0) { 104 } else if (button_count > 0) {
105 notification_type = message_center::NOTIFICATION_TYPE_BASE_FORMAT; 105 notification_type = message_center::NOTIFICATION_TYPE_BASE_FORMAT;
106 } 106 }
107 107
108 // Fill the optional fields with the information we need to make a 108 // Fill the optional fields with the information we need to make a
109 // notification. 109 // notification.
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 int index) const { 472 int index) const {
473 if (specifics_.coalesced_notification().render_info().expanded_info(). 473 if (specifics_.coalesced_notification().render_info().expanded_info().
474 collapsed_info_size() < index + 1) 474 collapsed_info_size() < index + 1)
475 return std::string(); 475 return std::string();
476 476
477 return specifics_.coalesced_notification().render_info().expanded_info(). 477 return specifics_.coalesced_notification().render_info().expanded_info().
478 collapsed_info(index).simple_collapsed_layout().description(); 478 collapsed_info(index).simple_collapsed_layout().description();
479 } 479 }
480 480
481 } // namespace notifier 481 } // namespace notifier
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/push_messaging/push_messaging_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698