OLD | NEW |
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/notification.h" | 5 #include "chrome/browser/notifications/notification.h" |
6 | 6 |
7 #include "chrome/browser/notifications/desktop_notification_service.h" | 7 #include "chrome/browser/notifications/desktop_notification_service.h" |
8 | 8 |
9 Notification::Notification(const GURL& origin_url, | 9 Notification::Notification(const GURL& origin_url, |
10 const GURL& content_url, | 10 const GURL& content_url, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 replace_id_ = notification.replace_id(); | 120 replace_id_ = notification.replace_id(); |
121 if (notification.optional_fields()) | 121 if (notification.optional_fields()) |
122 optional_fields_.reset(notification.optional_fields()->DeepCopy()); | 122 optional_fields_.reset(notification.optional_fields()->DeepCopy()); |
123 else | 123 else |
124 optional_fields_.reset(); | 124 optional_fields_.reset(); |
125 delegate_ = notification.delegate(); | 125 delegate_ = notification.delegate(); |
126 return *this; | 126 return *this; |
127 } | 127 } |
128 | 128 |
129 void Notification::DisableTimeout() { | 129 void Notification::DisableTimeout() { |
130 #if defined(ENABLE_MESSAGE_CENTER) | |
131 if (!optional_fields_.get()) | 130 if (!optional_fields_.get()) |
132 optional_fields_.reset(new base::DictionaryValue()); | 131 optional_fields_.reset(new base::DictionaryValue()); |
133 optional_fields_->SetBoolean(message_center::kPrivateNeverTimeoutKey, true); | 132 optional_fields_->SetBoolean(message_center::kPrivateNeverTimeoutKey, true); |
134 #endif | |
135 } | 133 } |
OLD | NEW |